5

I have a large Oracle database (~300 GB) and I need to move a copy of the database to a new environment in a short period of time. I was wondering if there is a way to just pick up the raw files Oracle manages and move them to the new box and bypass doing a dump and then another import?

I was looking at http://docs.oracle.com/cd/B28359_01/server.111/b31107/asmcon.htm but not sure if this is what I need. Where are the raw data files stored?

2
  • Are you using Windows or Unix? Does the DB use ASM or flat files (I assume ASM, given the link you've provided)?
    – Philᵀᴹ
    Commented Jan 26, 2012 at 15:09
  • I thought ASM would be a potential answer and not a requirement. Not sure if it uses ASM but it's on Windows. Can I just pickup the raw files and move them? Where would they be stored?
    – Adam
    Commented Jan 26, 2012 at 15:12

2 Answers 2

6

This is largely dependent on the differences is Oracle version, and OS version. IF both are at the same version, and Oracle is patched in the same manor then the answer becomes a factor of:

IF all of the database related files will reside in the same place THEN

...do a cold clean shutdown of the database

...copy the datafiles, temp, undo, redo logs, control files AND instance related files (initINST.ora, spfileINST.ora, orapwINST, etc) in $ORACLE_HOME/dbs

...setup the instance in the oratab file (or, if it is Windows, use ORADIM to create the instance related windows service)

...startup normally

IF the file structure will change, but the instance name will not THEN

...do a cold clean shutdown of the database

...copy the datafiles, undo, redo logs AND instance related files (initINST.ora, spfileINST.ora, orapwINST, etc) in $ORACLE_HOME/dbs

...do not copy controlfiles

...setup the instance in the oratab file (or, if it is Windows, use ORADIM to create the instance related windows service)

...startup nomount

...recreate the controlfiles using the "create controlfile reuse ~ noresetlogs" command

...add back in TEMP tablespace

IF the file structure will change AND the instance name will as well THEN

...do a cold clean shutdown of the database

...copy the datafiles, undo, redo logs AND instance related files (initINST.ora, spfileINST.ora, orapwINST, etc) in $ORACLE_HOME/dbs

...do not copy controlfiles, temp or redo logs

...setup the instance in the oratab file (or, if it is Windows, use ORADIM to create the instance related windows service)

...startup nomount

...recreate the controlfiles using the "create controlfile set ~ resetlogs" command

...add back in TEMP tablespace

This is the typical, old-style clone technique. Normally, I am a fan of the RMAN DUPLICATE, but if this is a one time thing, I probably wouldn't worry about it. If this isn't 11g, you would be taking a separate backup, transporting that for use by rman. If it is 11g, duplicate can use the "from active database" clause, so long as the instances can reach each other on the network.

3

Copying the datafiles (while the database is down) from one server to the other is part, but not all, of what would be required. You'll also need the redo log files, and you'll also need to create a new controlfile on the target system. If you're moving to another windows machine, there are some other issues at work as well. You'll naturally need to have the same version of Oracle installed on the target machine with the same patches in place.

If you're using RMAN with a recovery catalog to take backups of your database, it might be easiest to use the DUPLICATE TARGET DATABASE command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.