R12 Hot Cloning
R12 Hot Cloning
Log on to the source system as the ORACLE user, and run the following commands:
$ cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl dbTier
Log on to the source system as the APPLMGR user, and run the following commands on each
node that contains an APPL_TOP:
$ cd [INST_TOP]/admin/scripts
$ perl adpreclone.pl appsTier
Step 2: Obtain a trace file script to recreate the controlfile. On the source database issue the
following
command:
The trace file script will be put into the user_dump_dest directory.
The name of the trace file script will be something like
PROD_ora_12345.trc.
Compare the date and time of the new trace file script to the time in
which you entered the ALTER DATABASE BACKUP CONTROLFILE TO TRACE
command.
This will ensure you will be using the most recent trace file script,
the one you created in this step
to:
If you want to change the Database Name , You need to use the clause SET DATABASE <new
dbname> in the create control file script as follows:
CREATE CONTROLFILE SET DATABASE "newdbname" RESETLOGS NOARCHIVELOG
You must specify RESETLOGS.
The ARCHIVELOG mode may be changed to NOARCHIVELOG if you wish to run the copied
database in noarchive log mode. Change all directories in the create controlfile clause to point to the
correct directories for the new target database, if necessary.
Leave "only" the CREATE CONTROLFILE clause. The other statements, like the recover command,
will be done manually. Be sure you also remove the STARTUP NOMOUNT command.
Note: Please ensure that there is no new datafile/tablespace added to Database after you generate
controlfile script as above
Step 4: On the source database make an online copy of all datafiles using:
SQL> ALTER TABLESPACE <NAME> BEGIN BACKUP;
or
SQL> ALTER DATABASE BEGIN BACKUP;
Do NOT copy the controlfiles and redo log files as they will be recreated. You must copy the datafiles
only after the ALTER .. BEGIN BACKUP command has been executed, otherwise the datafiles may be
corrupted.
Then do:
Step 5: After all datafiles have been copied issue the following
command:
You will need all of the archivelog files from the start of datafile copy commands including the one just
created with the command ALTER SYSTEM ARCHIVE LOG CURRENT.
Step 1: On the target system issue STARTUP NOMOUNT command. For example:
Step 2: Run the prepared script created in step 3 to create the new controlfile. For example:
SQL> @PROD_ora_12345.trc --- controlfile create script
You will be prompted to apply all of the archived redo logs from the source database including
the last archive redo log file created with the ALTER DATABASE ARCHIVE LOG CURRENT
command from step 5.
After applying all of these archive log files issue the CANCEL command.
Step 4: Open the database with resetlogs:
At this point the target database will have been successfully cloned and opened.
Step 5: Create Temporary Tablespace if not created in Source, else you shall add Temporary tablespace
Step 7:Configure the target system application server nodes (this step must be run on all application
nodes):
• Log onto the target system application nodes as the application software owner
• cd to the $COMMON_TOP/clone/bin directory
• execute the perl script adpreclone.pl
perl adcfgclone.pl appsTier
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl appsTier