SIMPLE QUESTION BACKUP AND RESTORE ORACLE DATABASE

Hi guys,

How can i create a backup of an oracle database, copy the files to a USB EXTERNAL HD, go to a different office and server and restore that database exactly the same it was before but on a different server.

Please be very detailed about it, im not a DBA.

Thanks in advance.
LVL 1
Rafael CorrêaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnsoneSenior Oracle DBACommented:
If you do a clean shutdown of the database (not SHUTDOWN ABORT or SHUTDOWN IMMEDIATE), then you should be able to simply copy all the files onto the external drive.  Nothing special there.  Make sure to get all the files (including pfile/spfile and control files).

Second server would need to be same architecture and OS version as the original.  Install same version of Oracle and patch to the same patches.  Then copy the files to their original paths (this makes life easier).

If a UNIX variant, you should be able to bring it up at that point.  For Windows, you are going to need to create the services first.

As file locations and names vary by system there isn't much more detail I can think of.  I would highly recommend getting someone experienced in this for a couple of days to do the project.
Rafael CorrêaAuthor Commented:
ITS RED HAT ORACLE 11G, the problem it's a hospital i can't bring the database down, needs to be done online and i did a live migration with vmware and should be an exact copy of the server database except i cant startup the database. Gives me a controlfile error then i fix that and gives me another error and so on so on
johnsoneSenior Oracle DBACommented:
It is impossible to move a database without some sort of down time or data loss.  Take your pick, you have to choose one.

To minimize downtime, I would recommend creating a physical standby database on the new machine.  The steps for that are well lined out in the documentation here -> http://docs.oracle.com/cd/E11882_01/server.112/e41134/create_ps.htm#SBYDB00200   NOTE:  This step requires no down time (assuming you are in archivelog mode already).

Then when you need to do the move, you shut down the original database.  Get the last of the archives plus the current online redo log over to the new machine, apply the last few logs and activate the new database.  Downtime would be the amount of time to apply the last of the logs.

If I am misunderstanding your question and you are not moving the database to a new system and just want to make a copy, then that can be done with RMAN.  Should require no down time.  Documentation for that is here -> http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV010

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Rafael CorrêaAuthor Commented:
Could you explain me the steps? i need no downtime, but i dont need to take all data, just 1 week or a month ago.
johnsoneSenior Oracle DBACommented:
The easiest way that I know of to do it with little or no knowledge of the backup and restore process is with RMAN.  Use the duplicate steps.  They are in the documentation link that I already posted.  Walks you right through all the steps.
Rafael CorrêaAuthor Commented:
DUPLICATE TARGET DATABASE TO dupdb
  FROM ACTIVE DATABASE
  PASSWORD FILE
  SPFILE
  NOFILENAMECHECK;

Then a copy the files to a hard drive and copy to new server?
johnsoneSenior Oracle DBACommented:
That is one of the examples in the documentation.  I don't know all your circumstances and the documentation walks you through all the options.  If that is the command that it comes up with, then go for it.

Honestly, I don't use duplicate.  I restore and recover a backup.  Duplicate is easier if you don't know your backups.
Rafael CorrêaAuthor Commented:
so i did in rman

backup database plus archivelogs;

then im copying everything to an hd , archive logs plus backup files.

then i can
statup nomount
set dbid=xxxxxx
restore controlfile from XXXXXX
alter database mount
restore database
recover database
alter database open

and that is it? Will work?

by the way thanks for helping this oracle noob
johnsoneSenior Oracle DBACommented:
Those look like the right steps.  I usually go with it and then see what the errors are.  From there I can usually figure it out.

I believe that this would be considered an incomplete recovery.  You may have to do ALTER DATABASE OPEN RESETLOGS.  If you run the command you have, it will actually tell you that.
Geert GOracle dbaCommented:
as you are not a dba ...
assuming your manager (or whoever) asked you this question takes full responsibility of this move
he/she probably knows the risks involved of no longer having the oracle database

i can just imagine lying on the operating table, after the surgeon has just started ... and
the screens go blank for an open heart surgery

really ? did you consider you are in a hospital ???

because of all the lives in the hospital it would be wrong to give you any advice on how to do it

the only good way ...
contact a local oracle dba consultant
and have him/her do the oracle db move

the consultant will first evaluate
and then propose you to find a date which suits all
and then will happilly do the move will you sitin and learn and explain what's going on while it happens

do you really want to be the person to blame when it all goes wrong ?
Rafael CorrêaAuthor Commented:
Geert if you do´t want to help, keep your comments to yourself, and i did successfully created a clone of the database. Thank you very much John.
Geert GOracle dbaCommented:
people have pointed out that words can be harsh
I take it to warn people about the harsh consequences when something does go wrong

These words usually set alarms off when seen in the same context "hospital" "no downtime" and "noob"
I'm in surgery next week, so I want to be sure all goes well ... :)

Taking a clone is rather easy ...
Is it in archivelog mode ?
Is it going to stay up ?
Are you taking backups ?
Rafael CorrêaAuthor Commented:
Yes for each question and, back up to the cloud, no tapes.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.