Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Cloning a database

Re: Cloning a database

From: Deepak Sharma <sharmakdeep_at_yahoo.com>
Date: Fri, 12 May 2000 08:25:38 -0700 (PDT)
Message-Id: <10495.105521@fatcity.com>


On production do a
'alter database backup controlfile to trace'

I assume you have a hot backup of production and also the Archived logs backup.

Copy the Hot backup (datafiles + redo logs only, no controlfile) and the Archived logs since the last Hot backup to the test machine. It would be nice to have the same disk configuration on the Test m/c.

Edit the controlfile trace (in
$ORACLE_BASE/admin/<prod sid>/udump) and remove the lines until you get to the 'CREATE CONTROLFILE ..' stmt. Edit this stmt as :

CREATE CONTROLFILE SET DATABASE "test" RESETLOGS ARCHIVELOG Move this script to the test m/c. Edit this script to update the directories for the datafiles and redo log files. Also comment out the lines for 'RECOVER ..' and 'Alter DATABASE OPEN ..'

Also, ensure your controlfile and archive destinations in initest.ora (or configtest.ora) are set properly on the test m/c

Set ORACLE_SID to test

Using svrmgrl, run the create controlfile script.

Perorm a database recovery using
'RECOVER DATABASE USING BACUP CONTROLFILE UNTIL CANCEL' You'll be prompted to supply an Archived log file, restore that file to the Archived destination (if not already there) and continue. Repeat for all archived files till you get to the last one. At that point specify 'CANCEL'

Issue the command
'ALTER DATABASE OPEN RESETLOGS' You're all done.


Do You Yahoo!? Received on Fri May 12 2000 - 10:25:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US