Steps to Clone an Oracle Database Instance
This procedure documents the steps to follow when cloning (making an exact copy without using the export/import utilities) an Oracle database instance. It should take around 30 minutes to complete if properly done and you know where you are going to place the files.
connect internal
alter database backup controlfile to trace;
exit;
This creates a trace file in the OFA udump directory named SID_ora_######.trc where ##### is the PID of the process that created the trace file.
Dump file /oracle/dbs/app/oracle/admin/SEED/udump/seed_ora_24583.trc
Oracle7 Server Release 7.3.3.5.0 - Production Release
With the distributed option
PL/SQL Release 2.3.3.5.0 - Production
ORACLE_HOME = /oracle/dbs/app/oracle/product/7.3.3
System name: SunOS
Node name: redwood
Release: 5.5.1
Version: Generic_103640-12
Machine: sun4u
Instance name: SEED
Redo thread mounted by this instance: 1
Oracle process number: 7
Unix process pid: 24583, image: oracle
Wed Nov 25 09:14:59 1998
Wed Nov 25 09:14:59 1998
*** SESSION ID:(6.1) 1998.11.25.09.14.59.000
# The following commands will create a new control file and use it
# to open the database.
# No data other than log history will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "SEED" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 8
MAXLOGHISTORY 800
LOGFILE
GROUP 1 '/export/home/oradata/SEED/redoSEED01.log' SIZE 500K,
GROUP 2 '/d13/oradata/SEED/redoSEED02.log' SIZE 500K,
GROUP 3 '/d14/oradata/SEED/redoSEED03.log' SIZE 500K
DATAFILE
'/export/home/oradata/SEED/system01.dbf',
'/export/home/oradata/SEED/rbs01.dbf',
'/export/home/oradata/SEED/temp01.dbf',
'/export/home/oradata/SEED/tools01.dbf',
'/export/home/oradata/SEED/users01.dbf',
'/oradata/SEED/development.dbf',
'/oradata/SEED/system02.dbf',
'/oradata/SEED/temp02.dbf',
'/oradata/SEED/tools02.dbf',
'/oradata/SEED/system03.dbf',
'/oradata/SEED/rbs02.dbf'
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;
CREATE CONTROLFILE SET DATABASE "CLONE" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 8
MAXLOGHISTORY 800
LOGFILE
GROUP 1 '/export/home/oradata/CLONE/redoSEED01.log' SIZE 500K,
GROUP 2 '/d13/oradata/CLONE/redoSEED02.log' SIZE 500K,
GROUP 3 '/d14/oradata/CLONE/redoSEED03.log' SIZE 500K
DATAFILE
'/export/home/oradata/CLONE/system01.dbf',
'/export/home/oradata/CLONE/rbs01.dbf',
'/export/home/oradata/CLONE/temp01.dbf',
'/export/home/oradata/CLONE/tools01.dbf',
'/export/home/oradata/CLONE/users01.dbf',
'/oradata/CLONE/development.dbf',
'/oradata/CLONE/system02.dbf',
'/oradata/CLONE/temp02.dbf',
'/oradata/CLONE/tools02.dbf',
'/oradata/CLONE/system03.dbf',
'/oradata/CLONE/rbs02.dbf'
;
ALTER DATABASE OPEN RESETLOGS
CONGRATULATIONS!!! YOURE DONE!!!!