Monday, October 02, 2006

copying an oracle database in 4 steps

I'd see if i can do this in 4 steps

Step 1) on the target database, SQL> alter database backup control to trace;

Step 2) copy the trace file and modify to specify the new database name and the first line of the sql file and all lines after the create controlfile statement
CREATE CONTROLFILE REUSE SET DATABASE "NEWNAME" RESETLOGS

Step 3) Copy cold back datafiles minus temp file and control file.

Step 4) Make sure that the last 2 lines of the trace file is run

SQL> ALTER DATABASE OPEN RESETLOGS;

and also make sure that the temp tablespace is created which also happens to be the last line in the trace file

Here is a proper how-to link if my steps didn't make sense: http://www.oracle.com/technology/obe/paa/obe-mdb/html/DB_CPY.htm

No comments:

dead pi

Well, I guess it has to happen at some point. the home automation raspberry pi has died. Much to do with the stupid Strontium mini SD card. ...