Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
Are you using Windows or Unix? Does the DB use ASM or flat files (I assume ASM, given the link you've provided)? –  FreshPhilOfSO Jan 26 '12 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 Fisher Jan 26 '12 at 15:12
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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