Cloning an Oracle/DB2/Sybase Database in a SAN Environment Using EVA Snapclone Technology (August 2007)

24
Appendix
Quick Reference Steps for Cloning an Oracle Database
The following section provides quick reference for the procedure used to clone an Oracle
database.
Assumption:
The original database is run in archive log mode, because all production database instances
must be available for recovery. However, the production system can remain online during
the cloning process.
Back up Controlfile to trace on source database.
o ALTER DATABASE BACKUP CONTROLFILE TO TRACE
Look up $ORACLE_HOME/admin/udump/*.trc file that contains create_controlfile.sql.
Copy $ORACLE_HOME/admin/udump/*.trc into create_controlfile.sql removing the extra non sql
pieces and duplication
Modify this create_controlfile.sql, as follows:
o The REUSE to SET.
o The SOURCEDB to NEWDB (that is, the new name of the target database).
o The NORESETLOGS to RESETLOGS.
o For each file listed under the DATAFILE clause, change the file name to the
new name in the CREATE CONTROLFILE command.
Place each tablespace of source database in hot backup mode, as follows:
SQL>alter tablespace begin backup
Take a SNAPCLONE using Command View EVA GUI.
Go to the destination environment.
Enter the create controlfile command (
create_controlfile.sql).
Enter the set autorecovery on command.
Enter the recover database using backup controlfile until cancel command.
Provide necessary archive log.
CANCEL recovery.
Issue ALTER DATABASE OPEN RESETLOGS.
SHUTDOWN and STARTUP database.