Cloning Oracle Application 11i Instance

Introduction

This section will cover the detailed steps required for cloning an 11i instance. Cloning an instance is creating a duplicate of the instance. But this definition is not exactly true, because during cloning we change various details like hostname, SID etc and configure the system as per these new values. But if we see the application data and other techstack versions are exactly same as source instance.

Need for Cloning

Some time situations arise where we have to clone our application system. For example, if we have a production instance and we want to create a test instance or a debug instance, then in that case we can just make a duplicate of production instance by cloning. Test instance is usually used when we want to test some patches before applying into production so as to avoid any unknown downtime for production system. Also some times we face issues in production and we want to reproduce the same error in test and get it fixed in test. Such kind of situations demands test instance.

This post is based on Metalink note ID 230672.1

Environment Information

My environment is 11.5.10.CU2. Database version is 9.2.0.6.
Further details about OA Framework version etc can be seen using following URL
http://<HOSTNAME&gt;:<PORT>/OA_HTML/OAInfo.jsp

OA Framework Version InformationOA Framework Version 11.5.10.2CU.
MDS Version 9.0.5.4.81 (build 481)
UIX Version 2.2.18
BC4J Version 9.0.3.13.51

The process

There are 2 major methods for cloning an application system.

1) Cloning Oracle application without rapid clone.

Cloning Oracle Applications Release 11i was originally published in conjunction with Release 11.5.5 and is applicable for all 11i releases up to 11.5.5 that are not AutoConfig enabled.

2) Cloning Oracle application using Rapidclone technology

Cloning Oracle Applications Release 11i with Rapid Clone is applicable for all 11i systems that have migrated to AutoConfig and enabled Rapid Clone. This method contains steps to install AutoConfig and Rapid Clone.

Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install. See OracleMetaLink Note 230672.1 (Cloning Oracle Applications 11i with Rapid Clone) for instructions on installing and enabling Rapid Clone.

Also there is one more method for cloning Oracle application with autoconfig, but this has been fully replaced by Cloning Oracle application using Rapidclone technology and is no longer supported by Oracle.

We will first discuss the method for cloning an Oracle Application with rapidclone.

With the flexible and sophisticated architecture of Oracle Applications Release 1i, simply copying all of the components will not provide you with a working applications system. For instance, there are numerous configuration files in your file system that must be modified based upon the physical topology. In addition, the Rapid Install installation process utilizes Oracle Universal Installer (OUI), which writes key information about the installation to a binary registry file. When you copy the system to a target location, you invalidate the binary registry file. Consequently, you will not be able to apply patches to the OUI-based
components.

Cloning the application system using rapid clone involves 3 major steps.

  1. Preparing the Source System
  2. Copy the file System to target location
  3. Configuring the target system

Preparing The source file system

Preparing The source file system actually contains 2 sub steps.

  1. Checking the pre-requisites patches
  2. Preparing the source system for cloning.

We will start with checking the pre-requisites for cloning.

1) Make sure that patch 2115451 is applied to the application system. This will create the neccessary perl script. In our case the version of application is 11.5.10CU2, so this patch was already applied.

2) Apply the latest AD Minipack (Apply patch 4712852 (AD.I.4) or higher).
Check the current AD level of your application.

SQL> select PATCH_LEVEL from fnd_product_installations
2  where PATCH_LEVEL like ‘%AD%’;

PATCH_LEVEL
——————————
11i.AD.I.2

The latest version of this AD patch is now 11i.AD.I.5. But atleast make the version to 11i.AD.I.4 as mentioned in metalink note ID 230672.1

3) Apply the latest Autoconfig patch to the application. As per the note ID 165195.1 the latest patch for autoconfig is 5985992(JUL/AUG 2007). Please carry out the post install steps properly as mentioned in the README.txt present in the patch directory.

4) Next step is to check if the latest rapid clone patches are applied or not. As per the metalink note ID 230672.1 the latest rapid clone patches are

* 3453499 (11i.ADX.F)
* 5225940 (Post ADX.F Fixes)
* 5972212 (For SLES 10)

SQL> select count(*) from ad_bugs
2  where bug_number = ‘3453499’;

  COUNT(*)
———-
1

SQL> select count(*) from ad_bugs
2  where bug_number = ‘5225940’;


COUNT(*)
———-
1

Third patch is required only if the application is on SLES linux.

5) Run Autoconfig on Application tier as well as on database tier. Make sure you did not encounter any error.

Completing till this step concludes that this environment can be now rapid cloned. We have all latest AD patches and autoconfig patches applied to the environment and also we have all latest rapid clone patches applied to the environment. Now next step is the actual preparation step for cloning the instance. Stay tuned !!

Preparing the source system for cloning

In this step we will prepare the source file system for cloning. This involves gathering the required configuration information. In a broad way this step will create the staged clone directory which will be having the driver files and configuration file of the source.

6) According to metalink note ID 230672.1, preparing the source system consists of preparing the database side and preparing the appltop side. We need to run adpreclone.pl script on both database side and appltop side. Lets check the details.

6a) Running adpreclone on database side.

[oracle@ocvmrh2122 oracle]$ cd $ORACLE_HOME
[oracle@ocvmrh2122 9.2.0]$ cd appsutil/
[oracle@ocvmrh2122 appsutil]$ cd scripts/
[oracle@ocvmrh2122 scripts]$ cd PROD_ocvmrh2122/
[oracle@ocvmrh2122 PROD_ocvmrh2122]$ ls
adautocfg.sh  addbctl.sh   adexecsql.pl  adpreclone.pl  adstrtdb.sql
adchknls.pl   addlnctl.sh  adlsnodes.sh  adstopdb.sql
bash-2.05$ ./adpreclone.pl  dbTier pwd=apps

When we run this command on the database side following things happens.

Techstack:

It will create following directories in the ORACLE_HOME/appsutil/clone

drwxr-xr-x   4 oracle01 oinstall    1024 Dec 31 02:00 jlib
drwxr-xr-x   5 oracle01 oinstall      96 Dec 31 02:00 db
drwxr-xr-x   5 oracle01 oinstall      96 Dec 31 02:00 data

“db” will contain the techstack information, “data” will contain the information related to datafiles and required for cloning.

Creates driver files at ORACLE_HOME/appsutil/driver/instconf.drv
Converts inventory from binary to xml, the xml file is located at $ORACLE_HOME/appsutil/clone/context/db/SCMIDC_ap101fam.xml

Prepare database for cloning:

This includes creating datbase control file script and datafile location information file at

$ORACLE_HOME/appsutil/template
-rwxr-xr-x   1 oracle01 oinstall    4826 Dec 31 02:00 adcrdbclone.sql
-rwxr-xr-x   1 oracle01 oinstall    4508 Dec 31 02:00 dbfinfo.lst
Generates database creation driver file at ORACLE_HOME/appsutil/clone/data/driver

bash-2.05$ ls -rlt
-rw-r–r–   1 oracle01 oinstall     794 Dec 31 02:00 data.drv

Copy JDBC Libraries at ORACLE_HOME/appsutil/clone/jlib/classes12.jar and appsoui

6b) Running adpreclone on appltop side

[applmgr@ocvmrh2122 prodappl]$ cd $COMMON_TOP
[applmgr@ocvmrh2122 prodcomn]$ cd admin/scripts/PROD_ocvmrh2122/
[applmgr@ocvmrh2122 PROD_ocvmrh2122]$ ./adpreclone.pl appsTier pwd=apps

This will create stage directory at $COMMON_TOP/clone. This goes into two stages

Techstack:

Creates template files for
Oracle_iAS_Home/appsutil/template
Oracle_806_Home/appsutil/template

Creates Techstack driver files for

Oracle_iAS_Home/appsutil/driver/instconf.drv
Oracle_806_Home/appsutil/driver/instconf.drv

APPL_TOP preparation:

-It will create application top driver file
$COMMON_TOP/clone/appl/driver/appl.drv

-Copy JDBC libraries
$COMMON_TOP/clone/jlib/classes111.zip

Copy the file System to target location

Once the application system is prepared for cloning. Next thing that you have to do is to bring down database and listener as well (complete application system is down) and copy the whole application to the location, where you want to create a clone.
You need to copy the following components.

On Application side:
<APPL_TOP>
<OA_HTML>
<OA_JAVA>
<OA_JRE_TOP>
<COMMON_TOP>/util
<COMMON_TOP>/clone
<COMMON_TOP>/_pages  (when this directory exists)
<806 ORACLE_HOME>
<iAS ORACLE_HOME>

On Database side (Do a proper shutdown of database (immediate)):
copy DBF files
copy ORACLE_HOME

Configuring the target system

Once all the copy is done on the target system, you can start your source application system for normal use.
Target system can be configured as given below.

On database side:

cd $ORACLE_HOME/appsutils/clone/bin
perl adcfgclone.pl dbTier pwd=apps

This will use the templates and driver files those where created while running adpreclone.pl on source system and has been copied to target system.

Following scripts are run by adcfgclone.pl for configuring techstack

  • adchkutl.sh — This will check the system for ld, ar, cc, and make versions.
  • adclonectx.pl — This will clone the context file. Because when we copy the application files from source system to target system, we also copy the context file. But this context file wont be of use here. So we need to create a new context file as per the details of this instance. Here hostname, ports and other details will change.
  • runInstallConfigDriver — located in $Oracle_Home/appsutil/driver/instconf.drv
  • Relinking $Oracle_Home/appsutil/install/adlnkoh.sh — This will relink ORACLE_HOME

For data on database side, following scripts are run

  • Driver file $Oracle_Home/appsutil/clone/context/data/driver/data.drv
  • Create database adcrdb.zip
  • Autoconfig is run
  •  Control file creation adcrdbclone.sql

On Application Side:

COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier pwd=apps

Following scripts are run by adcfgclone.pl

Creates context file for target adclonectx.pl

Run driver files
$ORACLE_HOME/appsutil/driver/instconf.drv
$IAS_ORACLE_HOME/appsutil/driver/instconf.drv

Relinking of Oracle Home
$ORACLE_HOME/bin/adlnk806.sh
$IAS_ORACLE_HOME/bin/adlnkiAS.sh

At the end it will run the driver file $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.

References:

Metalink Note ID: 216664.1 – Frequently Asked Questions Cloning Oracle Applications 11i

Metalink Note ID: 230672.1 – Cloning Oracle Applications Release 11i with Rapid Clone

http://techblogspace.com/appsdba/

3 thoughts on “Cloning Oracle Application 11i Instance

  1. Hello Guru,

    I’ve cloned a single node system to my target system, but facing an error during post cloning, where when running the adcfgclone.pl appsTier gives me an “ERROR”( Error occured during Initillization of vm java/lang/NoClassDefFoundError: java/lang/object), i have successfully configured the database Tier. May i receive some help.

    Regards
    Albert E. Issangya

  2. Hi, is possible cloning an instance without datatop portion? i means just the structure without transaction data?

Leave a reply to Albert Issangya Cancel reply