Move an Oracle database by moving the raw data files

migrationoraclerestore

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?

Best Answer

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.