Clone Oracle Applications 11i / R12
Clone Oracle Applications 11i / R12
===========================
Cloning-Cloning is the process used to create a copy of an existing Oracle Applications system. There are various scenarios for cloning an Oracle Applications system.
Use Rapid Clone to create template files for cloning on the source system. After the source system is copied to the target, Rapid Clone updates these templates to contain the new target system configuration settings. Rapid Clone will not change the source system configuration.
There are three phases to the cloning process:
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 <COMMON_TOP>/admin/scripts/<CONTEXT_NAME>
perl adpreclone.pl appsTier
FOR R12
cd <INST_TOP>/admin/scripts
perl adpreclone.pl appsTier
2. Copy the Source System to the Target System
Copy the application tier file system from the source Applications system to the target node by executing the following steps in the order listed. Ensure the application tier files copied to the target system are owned by the target APPLMGR user, and that the database tier files are owned by the ORACLE user.
A good idea is to tar the directories in the sources and untar it on the target node.
This would not cause any permission problems and links would be preserved.
a Copy the database tier file system
Log on to the source system database node as the ORACLE user.
Option 1 – Cold Backup Perform a normal shutdown of the source system database and Applications
Copy the database (DBF) files from the source to the target system Copy the source database ORACLE_HOME to the target system
Option 2 – Hot backup Put database in begin backup mode
Copy the database (DBF) files from the source to the target system
Put the database in end backup mode
Copy the source database ORACLE_HOME to the target system
3 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)
a.Configure the target system database server
Option 1 – Cold Backup being Used
Log on to the target system as the ORACLE user and type the following commands to configure and start the database:
cd <RDBMS ORACLE_HOME>/appsutil/clone/binperl adcfgclone.pl dbTier.
Steps to follow in cold backup cloning:-
The following are the steps for performing database cloning using cold backup
Assumptions : You are using Linux flavour OS and following same directory structure
1. Take the cold backup of source database
2. Take controlfile trace and pfile or spfile (that was using by the source database)
3. Install Oracle software on another machine (choose “Install only” option in OUI). Don’t create any database
4. Copy all the files (including trace file and pfile or spfile) from source server to target server either using FTP or rcp
5. Place pfile or spfile in “dbs” directory on target
6. Copy the remaining files to their respective locations (If any directories are missing, do create them)
7. Open bash_profile file and set ORACLE_HOME and ORACLE_SID
8. Connect as sysdba and Startup the database
Option 2 – Hot Backup being Used
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
Create the target database control files manually
Start the target system database in open mode
*If you are Using RMAN , Duplicate the Database from source to target.
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.
Configure the target database (the database must be open)
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbatabase <target context file>
where target context file is:
<RDBMS ORACLE_HOME>/appsutil/<Target CONTEXT_NAME>.xml
Respond to the prompt as follows-
Assumptions-
1) Latest versions of Perl, JRE,JDK,ZIP utilities are available on source and target systems.
2) Latest AD Minipack is applied on Application Tier
3) Latest Autoconfig Template Patch and Latest RapidClone Patches are applied to Application Tier.
4) Source database is in Archive log mode. Ex: Alter database archivelog and Change log_archive_enable to TRUE in initSID.ora
Steps to do on Source System:
1) Log into Database Tier as DB user and run adpreclone.
Ex: cd $ORACLE_HOME/appsutil/scripts/CONTEXT NAME/ perl adpreclone.pl dbTier
2) Log into Application Tier as Apps user and run preclone.
Ex: cd $COMMON_TOP/admin/scripts/CONTEXT NAME/ perl adpreclone.pl appsTier
3) Place the database in Begin Backup Mode. Ex: alter database begin backup (10g onwards) or alter tablespace <tablespace name> begin backup(Prior to 10g)
4) Copy all the datafiles to Backup directory or to target system.
Note: Copying of control, log and temp file is not necessary.
5) Backup the control file to trace (located in udump) and copy it to Backup directory.
Ex: alter database backup control file to trace
6) Remove database from Begin Backup Mode. Ex: alter database end backup
7) Now copy DB_TOP as DB user to Backup directory or target system. (Take Backup of Archive logs also if they are located in some other place)
Next copy APPL_TOP, COMMON_TOP and ORA_TOP as Apps user to Backup directory or target system.
Steps to do on Target System:
1) Copy all the files from Backup Directory to this system under respective user groups and change the permissions for all the directories recursively.
2) Log into Database Tier as DB user and configure it.
Ex: cd $ORACLE_HOME/appsutil/clone/bin/ perl adcfgclone.pl dbTechStack
3) Create a control file manually from the file which we backed up from trace.
a. Remove all lines before the startup nomount statement
b. Modify the REUSE to SET
c. Modify Source DB SID to Target SID (Here PROD to TEST)
d. Modify NORESETLOGS TO RESETLOGS
e. Delete all lines after the CHARACTER SET statement
f. Change the datafile locations according to their locations in target system.
Note: Save the file as an sql executable file with .sql extension.
4) Now modify the initSID.ora file accordingly for Target system and enable archive log mode in it.
5) Now start the database in nomount state. Ex: startup nomount pfile=”<initSID.ora location>”
6) Now run the modified control file (sql file). With this database will be in mount state.
7) After the database is mounted, execute recover command using backup control file.
Ex: recover database using backup controlfile until cancel
Now open the database. Ex: alter database open resetlogs
9) Now add a temp file to the target database. Ex: 1) create temporary tablespace TEMP tempfile ‘<temp file location>’ size 50M autoextend off.
Ex: 2) alter tablespace TEMP add tempfile ‘<temp file location>’ size 50M autoextend off
10) Log into the Application Tier as Apps user and configure it.
Ex :cd $COMMON_TOP/clone/bin/ perl adcfgclone.pl appsTier Finishing tasks:
(1) Update Profile options
(2) Update Printer Settings
(3) Update the workflow configuration settings
(4) Verify the APPLCSF variable setting
(5) Update the session_cookie_domain value in icx_parameters
Log Files:
1) cd $ORACLE_HOME/appsutil/log/CONTEXT NAME/*.log
2) cd $APPPL_TOP/admin/CONTEXT NAME/log/*.log
steps to follow in hot backup cloning using rman:-
Connect to the target database using rman backup the database on node 1 rman target /
backup database;
2) Move the following files to the NODE 2:
- backup pieces
- controlfile backup piece
- the parameter file i.e init.ora file to the default location i.e $ORACLE_HOME/dbs
3) Modify PFILE accordingly, invoke Rman on the node 2 after setting the Oracle environment variables and start the database in nomount mode:
export ORACLE_HOME, ORACLE_SID, PATH
$rman target /
RMAN> startup nomount;
RMAN > alter database mount
Now catalog the backup pieces that was moved from NODE 1
RMAN> catalog backuppiece ‘/node2/database/backup/o1_mf_annn_TAG20070213T002925_2×21m6ty_.bkp’;
Now restore the datafiles
RMAN> run
{
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
b Configure the target system application tier server nodes
On the applications Tier nodes , make sure you copy the database tns entry from the database tier to the
806 ORACLE_HOME/network/admin/tnsnames.ora
set the ORACLE_HOME to the target 806 ORACLE_HOME
set the TNS_ADMIN to $ORACLE_HOME/network/admin
set the TWO_TASK to the connection Identifier proided in tnsnames.ora
ie. before you run adcfgclone.pl , you should be able to connect to the database using sqlplus
as apps ( apps/<appspwd>@<conection_identifier>)
Log on to the target system as the APPLMGR user and type the following commands:
cd <COMMON_TOP>/clone/bin
perl adcfgclone.pl appsTier
This will prompt you new port pool for applictaion tier services as well as new APPLTOP,COMMON_TOP,ORACLE_HOME and IAS_ORACLE_HOME
Successful completion of this task will bring up your application tier services on the target or the cloned node.
Clone Oracle Applications 11i / R12
===========================
Cloning-Cloning is the process used to create a copy of an existing Oracle Applications system. There are various scenarios for cloning an Oracle Applications system.
Use Rapid Clone to create template files for cloning on the source system. After the source system is copied to the target, Rapid Clone updates these templates to contain the new target system configuration settings. Rapid Clone will not change the source system configuration.
There are three phases to the cloning process:
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 <COMMON_TOP>/admin/scripts/<CONTEXT_NAME>
perl adpreclone.pl appsTier
FOR R12
cd <INST_TOP>/admin/scripts
perl adpreclone.pl appsTier
2. Copy the Source System to the Target System
Copy the application tier file system from the source Applications system to the target node by executing the following steps in the order listed. Ensure the application tier files copied to the target system are owned by the target APPLMGR user, and that the database tier files are owned by the ORACLE user.
A good idea is to tar the directories in the sources and untar it on the target node.
This would not cause any permission problems and links would be preserved.
a Copy the database tier file system
Log on to the source system database node as the ORACLE user.
Option 1 – Cold Backup Perform a normal shutdown of the source system database and Applications
Copy the database (DBF) files from the source to the target system Copy the source database ORACLE_HOME to the target system
Option 2 – Hot backup Put database in begin backup mode
Copy the database (DBF) files from the source to the target system
Put the database in end backup mode
Copy the source database ORACLE_HOME to the target system
3 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)
a.Configure the target system database server
Option 1 – Cold Backup being Used
Log on to the target system as the ORACLE user and type the following commands to configure and start the database:
cd <RDBMS ORACLE_HOME>/appsutil/clone/binperl adcfgclone.pl dbTier.
Steps to follow in cold backup cloning:-
The following are the steps for performing database cloning using cold backup
Assumptions : You are using Linux flavour OS and following same directory structure
1. Take the cold backup of source database
2. Take controlfile trace and pfile or spfile (that was using by the source database)
3. Install Oracle software on another machine (choose “Install only” option in OUI). Don’t create any database
4. Copy all the files (including trace file and pfile or spfile) from source server to target server either using FTP or rcp
5. Place pfile or spfile in “dbs” directory on target
6. Copy the remaining files to their respective locations (If any directories are missing, do create them)
7. Open bash_profile file and set ORACLE_HOME and ORACLE_SID
8. Connect as sysdba and Startup the database
Option 2 – Hot Backup being Used
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
Create the target database control files manually
Start the target system database in open mode
*If you are Using RMAN , Duplicate the Database from source to target.
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.
Configure the target database (the database must be open)
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbatabase <target context file>
where target context file is:
<RDBMS ORACLE_HOME>/appsutil/<Target CONTEXT_NAME>.xml
Respond to the prompt as follows-
Database SID | Target database sid | |
Database name | Target system domain name | |
Target system database name | Target system database name | |
Target instance is a Real Application Cluster (RAC) instance (y/n) | Answer yes if it is a part of rac instanceThis prompt only appears when you answered “yes” to the previous question.yes to this question if the current host is the first node being configured in the target system RAC cluster. The tool will then ask for the number of nodes that will exist in the final RAC instance and gather, the following information for every node Hostname Database Sid Instance number Listener port Private interconnect name | |
Current node is the first node in an N Node RAC Cluster (y/n) | Answer “no” to this qstion if at least one node of the target RAC cluster has already been configured by Rapid Clone (i.e if you already replied “yes” to this question for any other node in the cluster). The tool will then prompt for the following information to connect to a life node (the answers must describe a node that has already been configured):- Hostname- Database Sid - Listener port | |
RDBMS ORACLE_HOME directory | Path to the Target system RDBMS ORACLE_HOME | |
Number of DATA_TOP’s: DATA_TOP 1: DATA_TOP 2: DATA_TOP 3: |
Database mount points. Enter the number of distinct directories containing the target database dbfs, then their paths. |
Assumptions-
1) Latest versions of Perl, JRE,JDK,ZIP utilities are available on source and target systems.
2) Latest AD Minipack is applied on Application Tier
3) Latest Autoconfig Template Patch and Latest RapidClone Patches are applied to Application Tier.
4) Source database is in Archive log mode. Ex: Alter database archivelog and Change log_archive_enable to TRUE in initSID.ora
Steps to do on Source System:
1) Log into Database Tier as DB user and run adpreclone.
Ex: cd $ORACLE_HOME/appsutil/scripts/CONTEXT NAME/ perl adpreclone.pl dbTier
2) Log into Application Tier as Apps user and run preclone.
Ex: cd $COMMON_TOP/admin/scripts/CONTEXT NAME/ perl adpreclone.pl appsTier
3) Place the database in Begin Backup Mode. Ex: alter database begin backup (10g onwards) or alter tablespace <tablespace name> begin backup(Prior to 10g)
4) Copy all the datafiles to Backup directory or to target system.
Note: Copying of control, log and temp file is not necessary.
5) Backup the control file to trace (located in udump) and copy it to Backup directory.
Ex: alter database backup control file to trace
6) Remove database from Begin Backup Mode. Ex: alter database end backup
7) Now copy DB_TOP as DB user to Backup directory or target system. (Take Backup of Archive logs also if they are located in some other place)
Next copy APPL_TOP, COMMON_TOP and ORA_TOP as Apps user to Backup directory or target system.
Steps to do on Target System:
1) Copy all the files from Backup Directory to this system under respective user groups and change the permissions for all the directories recursively.
2) Log into Database Tier as DB user and configure it.
Ex: cd $ORACLE_HOME/appsutil/clone/bin/ perl adcfgclone.pl dbTechStack
3) Create a control file manually from the file which we backed up from trace.
a. Remove all lines before the startup nomount statement
b. Modify the REUSE to SET
c. Modify Source DB SID to Target SID (Here PROD to TEST)
d. Modify NORESETLOGS TO RESETLOGS
e. Delete all lines after the CHARACTER SET statement
f. Change the datafile locations according to their locations in target system.
Note: Save the file as an sql executable file with .sql extension.
4) Now modify the initSID.ora file accordingly for Target system and enable archive log mode in it.
5) Now start the database in nomount state. Ex: startup nomount pfile=”<initSID.ora location>”
6) Now run the modified control file (sql file). With this database will be in mount state.
7) After the database is mounted, execute recover command using backup control file.
Ex: recover database using backup controlfile until cancel
Now open the database. Ex: alter database open resetlogs
9) Now add a temp file to the target database. Ex: 1) create temporary tablespace TEMP tempfile ‘<temp file location>’ size 50M autoextend off.
Ex: 2) alter tablespace TEMP add tempfile ‘<temp file location>’ size 50M autoextend off
10) Log into the Application Tier as Apps user and configure it.
Ex :cd $COMMON_TOP/clone/bin/ perl adcfgclone.pl appsTier Finishing tasks:
(1) Update Profile options
(2) Update Printer Settings
(3) Update the workflow configuration settings
(4) Verify the APPLCSF variable setting
(5) Update the session_cookie_domain value in icx_parameters
Log Files:
1) cd $ORACLE_HOME/appsutil/log/CONTEXT NAME/*.log
2) cd $APPPL_TOP/admin/CONTEXT NAME/log/*.log
steps to follow in hot backup cloning using rman:-
Connect to the target database using rman backup the database on node 1 rman target /
backup database;
2) Move the following files to the NODE 2:
- backup pieces
- controlfile backup piece
- the parameter file i.e init.ora file to the default location i.e $ORACLE_HOME/dbs
3) Modify PFILE accordingly, invoke Rman on the node 2 after setting the Oracle environment variables and start the database in nomount mode:
export ORACLE_HOME, ORACLE_SID, PATH
$rman target /
RMAN> startup nomount;
- Restore the controlfile from the backup piece.
RMAN> restore controlfile from ‘/node2/database/backup/c-3932056136-20070213-02′;
RMAN > alter database mount
Now catalog the backup pieces that was moved from NODE 1
RMAN> catalog backuppiece ‘/node2/database/backup/o1_mf_annn_TAG20070213T002925_2×21m6ty_.bkp’;
Now restore the datafiles
RMAN> run
{
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
b Configure the target system application tier server nodes
On the applications Tier nodes , make sure you copy the database tns entry from the database tier to the
806 ORACLE_HOME/network/admin/tnsnames.ora
set the ORACLE_HOME to the target 806 ORACLE_HOME
set the TNS_ADMIN to $ORACLE_HOME/network/admin
set the TWO_TASK to the connection Identifier proided in tnsnames.ora
ie. before you run adcfgclone.pl , you should be able to connect to the database using sqlplus
as apps ( apps/<appspwd>@<conection_identifier>)
Log on to the target system as the APPLMGR user and type the following commands:
cd <COMMON_TOP>/clone/bin
perl adcfgclone.pl appsTier
Provide the values required for creation of the new APPL_TOP context file:
Database server node | Hostname for the machine hosting the database server |
Does the target system have more than one applications tier server node (y/n) | Answer yes if the target system is part of a
multi-nodes configuration. The tool with then prompt for the hostnames
of:- concurrent processing node- administration node
- forms server node - web server node |
Is the target system APPL_TOP divided into multiple mount points (y/n)? | Answer yes if the target system APPL_TOP is divided
across multiple mount points. The tool will then prompt for each
auxiliary mount (4 mounts): - APPL_TOP mount point - APPL_TOP aux.1 - APPL_TOP aux.2 - APPL_TOP aux.3 |
APPL_TOP mount point | APPL_TOP directory |
COMMON_TOP directory | COMMON_TOP directory |
ORACLE_HOME directory | ORACLE_HOME directory |
iAS ORACLE_HOME directory | iAS ORACLE_HOME directory |
Location of JDK 1.3.1 | Location of JDK 1.3.1 |
This will prompt you new port pool for applictaion tier services as well as new APPLTOP,COMMON_TOP,ORACLE_HOME and IAS_ORACLE_HOME
Successful completion of this task will bring up your application tier services on the target or the cloned node.
No comments:
Post a Comment