0% found this document useful (0 votes)
74 views4 pages

R12 Hot Cloning

This document outlines 7 steps to hot clone an Oracle database: 1) Prepare the source system for cloning, 2) Obtain a script to recreate the control file, 3) Modify the script to reset logs and point to target directories, 4) Copy datafiles and archive logs, 5) Recover the database using the scripts, 6) Configure the target system, 7) Configure target application servers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views4 pages

R12 Hot Cloning

This document outlines 7 steps to hot clone an Oracle database: 1) Prepare the source system for cloning, 2) Obtain a script to recreate the control file, 3) Modify the script to reset logs and point to target directories, 4) Copy datafiles and archive logs, 5) Recover the database using the scripts, 6) Configure the target system, 7) Configure target application servers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 4

R12 hot cloning steps

1) Prepare the source system


Execute the following commands to prepare the source system for cloning:

a. Prepare the source system database tier for 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

b. Prepare the source system application tier for cloning

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:

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

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

Step 3: In the create controlfile script just created in step 2 change:

CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS

to:

CREATE CONTROLFILE DATABASE "PROD" RESETLOGS ARCHIVELOG

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;

Copy all datafiles within tablespace <NAME> to the new directory.


On Unix systems, this can be done with the cp command.

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:

SQL> ALTER TABLESPACE <NAME> END BACKUP;


OR

SQL> ALTER DATABASE END BACKUP;

Step 5: After all datafiles have been copied issue the following
command:

SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

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 6: Copy the database (DBF) files,controlfile script and archive


log files from the source to the target
system
copy controlfile script, archive log files.

configure the target system

Execute the following commands to configure the target system. You


will be prompted for the target system specific values (SID, Paths,
Ports, etc)

Log on to the target system as the ORACLE user


• Configure the <RDBMS ORACLE_HOME>
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbTechStack

Step 1: On the target system issue STARTUP NOMOUNT command. For example:

SQL> startup nomount pfile=initTEST.ora

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

Step 3: Issue the command:

SQL> RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE

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:

SQL>ALTER DATABASE OPEN 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 6: Run the library update script against the database


• cd <RDBMS ORACLE_HOME>/appsutil/install/<CONTEXT NAME>
• sqlplus "/ as sysdba" @adupdlib.sql <libext>
where <libext> is "sl" for HP-UX, "so" for any other UNIX
platform and
not required for Windows.

Step 6: Configure the target database (the database must be open)


• cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
• perl adcfgclone.pl dbconfig <target context file>
where target context file is:
<RDBMS ORACLE_HOME>/appsutil/<Target CONTEXT_NAME>.xml

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy