We often need to clone the R12.1 environment to create another test environment.
Here are the steps on How to clone R12.1 Environment
Step 1: Prepare the Source System database tier for cloning
1. Log on to the Source System as the Oracle user.
2. Source the Database tier environment file.
cd <RDBMS ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>
perl adpreclone.pl dbTier
This will create a $ORACLE_HOME/appsutil/clone directory on the source database home
2. Prepare the Source System application tier for cloning
1. Log on to the primary node of the Source System as the applmgr user.
2. Source the environment file of the Run Edition File system.
3. Execute the following commands:
$ cd <INST_TOP>/admin/scripts
$ perl adpreclone.pl appsTier
It may be tempting not to run this each time you clone from this env, but here are the reasons that will make you rethink your decision
(a) If you apply a new Rapid Clone or AutoConfig update to the system, you must execute adpreclone.pl again on the database tier and applications tier to apply the new files into the clone directory structures to be used during the cloning configuration stage.
The adpreclone.pl process on the application tier creates a clone directory in $COMMON_TOP
The adpreclone log files are created in the <INST_TOP>/admin/log/clone directory.
Step 2: Copy the Database Oracle home From the source to the target tier.
You can tar or cp command as per your convenience.
We need to make we check all the symlinks in the Oracle home on the target side and correct it
Step 3: Run adcfgclone
$ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
$ perl adcfgclone.pl dbTechstack
I am running here dbtechstack as I want to manage the database clone manually
This will relink the Oracle home, create all the configuration files
Step 4: Clone Source database target database using RMAN or manual hotbackup and cold backup whatever suits you.
Step 5:
Once the database is Open
a.Run AutoConfig in the INSTE8_SETUP mode on the database tier as follows:
On UNIX:
sh <RDBMS_ORACLE_HOME>/appsutil/bin/adconfig.sh contextfile=<CONTEXT_FILE> run=INSTE8_SETUP
b. Run the library update script against the database.
$ cd <RDBMS ORACLE_HOME>/appsutil/install/<CONTEXT NAME>
$ sqlplus “/ as sysdba” @adupdlib.sql <libext>
Where <libext> should be set to sl for HP-UX, so for any other UNIX platform, or dll for Windows.
c. Configure the Target database.
The database must be running and open before performing this step.
$ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin $ perl adcfgclone.pl dbconfig <Database Target Context File> Where "Database Target Context File" is: <RDBMS ORACLE_HOME>/appsutil/<Target CONTEXT_NAME>.xml.
Note: The dbconfig option will configure the database with the required settings for the new Target, but it will not recreate the control files.
Step 6: Copy the application tier file system from the Source to the Target
Only these files need to be copied. Make sure you pay attention to symbolic links under <OracleAS Tools 10.1.2 ORACLE_HOME> ,<COMMON_TOP>, and <OracleAS Tools 10.1.3 ORACLE_HOME>directories when copying files.
<APPL_TOP>
<COMMON_TOP>
<OracleAS Tools 10.1.2 ORACLE_HOME>
<OracleAS Tools 10.1.3 ORACLE_HOME>
Run
$ cd <COMMON_TOP>/clone/bin $ perl adcfgclone.pl appsTier
The log files are created in the <INST_TOP>/admin/log/clone directory in the Run Edition File System.
This same steps need to be done on all the application tiers to be configured
Post Clone Steps
Step 8: Till now we have not changed the apps/applsys password. If it is required, Please make the changes using the FNDCPASS utility
how to run FNDCPASS and AFPASSWD
Step 9: We should be able to start the application services from the web nodes
$ADMIN_SCRIPTS_HOME/adstrall.sh apps/<apps pass>
Step 9: Perform the changes in Profiles, and Concurrent Manager nodes if any required
Step 10: Start the Concurrent manager and verify it
Step 11: If there are custom components or configurations (like printers, and third-party integrations), these need to taken care now separately
Related Articles
Hot backup database cloning: This post consists of step-by-step detailed instructions to clone the Oracle database using the Hot backup database cloning method
Cold backup Database Cloning: This post consists of step-by-step detailed instructions to clone the Oracle database using the cold backup database cloning method
How to clone R12.2 Environment: This page provides a step-by-step approach for cloning the R12.2 environment successfully. R12.2 is the latest release of Oracle apps
How to Clone Oracle Application Server 10g: check out this post for step-by-step instructions to clone application server 10g.It involves preparing clone, copying, and then cloning
How to clone Oracle Home: check out for step-by-step instructions to Oracle Home in 10g/11g/12c/19c/23c. It involves preparing clone, copying, and then cloning