Data & Intelligence

Cloning in Oracle EBS R12

CLONING IN ORACLE EBS R12 PRODUCTION SYSTEM:

Cloning plays an important role in the Oracle EBS Production system. There are regular requests from developers to clone the production system and prepare the development for the EBS System. The biggest challenge is ensuring that we do not disturb the production or clone within the development system.

Steps to Follow When Cloning

Steps on the Source Instance (Production)

Step 1 (approx 15 mins)

As an oracle OS user on the server ebsproddb01.test.org, RDBMS server:

cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME

perl adpreclone.pl dbTier (provide apps password)

Log File to Check: $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/StageDBTier_<mmddhhmi>.log

[oracle@ebsproddb01 EBSPROD_ebsproddb01]$ perl adpreclone.pl dbTier

Step 2 (approx 15 mins)

As an oracle OS user on the server ebsprodapps01.test.org, APPS server:

cd $COMMON_TOP/admin/scripts/$CONTEXT_NAME

perl adpreclone.pl appsTier

Log File to Check: $INST_TOP/admin/log/StageAppsTier_<mmddhhmi>.log

[oracle@ebsprodapps01 scripts]$ perl adpreclone.pl appsTier

Steps on the Target Instance (DEVELOPMENT)

Step 1

Shutdown the current instance – APPS, Database and DB Listener

Step 2

Create a backup of necessary files like – pfile, tnsnames, context file etc and copy under a folder in oracle user $HOME

Step 3

Create a backup of the context file and keep into /tmp or winscp  to your desktop

Cloning steps on Source and Target EBS system

On the source system (Production) do the following

STEP 1

On the Source Server as an oracle OS user on the server ebsproddb01.test.org, create a parameter file for starting the database later on:

sql > create pfile from spfile; ($ORACLE_HOME/dbs/initEBSPROD.ora)

On Target Server as oracle OS user take a backup of PFILE:

sql > create pfile=’/home/oracle/EBSTEST_bkp/pfile_bkp.ora’ from spfile;

Step 2

As an oracle OS user on the server ebsproddb01.test.org, archive all log files and put the database in hot backup mode:

sqlplus / as sysdba

alter system archive log current;

alter database begin backup;

select distinct status from v$backup;

The systems engineer does the flex clone

TEST Systems engineer then you will need to perform a Flex clone of the “EBSPROD” volumes located on the NetApp Filers in the server’s ebsproddb01.test.org and ebsprodapps01.test.org.

Do the following on the source system (Production)

As an oracle OS user on the server ebsproddb01.test.org, the Production environment then needs to be taken out of hot backup mode and the log files archived:

alter database end backup;

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

alter system archive log current;

select distinct status from v$backup;

Should return NOT ACTIVE which means that all files associated with all tablespaces are no longer in hot backup mode.

Database Tier Cloning do it one source system (DEVELOPMENT)

Step 1:

Database File System configuration

Log on to the target system as the ORACLE user

As an oracle (or equivalent) OS user on the target server (EBSTEST), ensure you have no Oracle environment variables set.

env | grep ORA    shouldn’t return any ORACLE environment variables

ps –eaf|grep ora -> shouldn’t return any ORACLE processes

Configure the [RDBMS ORACLE_HOME]. This step will register your RDBMS Oracle home to central inventory and relink RDBMS oracle home.

Sample Output:

[oracle@ebsEBSTESTdb bin]$ perl adcfgclone.pl dbTechStack

Step 2:

Target System Database Recovery

Control File Creation:

As an oracle (or equivalent) OS user on the target server (EBSTEST), modify the controlfile $HOME/EBSTEST_bkp/create_control_yyyymmdd.sql as follows:

Everything before the CREATE CONTROLFILE statement can be removed from the file.

Any directory paths of files will have to be amended, to reflect the name change of mount points.

For example: from EBSPROD to EBSTEST

Step3:

INIT.ORA File Creation:

Modify the initEBSPROD.ora parameter file in $ORACLE_HOME/dbs, to reflect the name change of any mount points on the EBSTEST server. i.e. EBSPROD will become EBSTEST etc.

STARTUP the DATABASE in NOMOUNT and CREATE CONTROL FILE

RECOVER Database and OPEN:

SQL> recover database using backup controlfile until cancel;

Step 4:

To complete the database configuration side of things run the following:

Run the library update script against the database

cd $ORACLE_HOME/appsutil/install/$CONTEXT_NAME

sqlplus “/ as sysdba” @adupdlib.sql

sqlplus “/ as sysdba” @adupdlib.sql so

Where [libext] should be set to ‘sl’ for HP-UX, ‘so’ for any other UNIX platform, or ‘dll’ for Windows.

[oracle@ebsEBSTESTdb dbs]$ cd $ORACLE_HOME/appsutil/install/$CONTEXT_NAME

[oracle@ebsEBSTESTdb EBSTEST_ebsEBSTESTdb]$ sqlplus “/ as sysdba” @adupdlib.sql so

Step 5:

Configure the target database (the database/listener must be open)
Start-up listener: lsnrctl start EBSTEST

cd $ORACLE_HOME/appsutil/clone/bin

perl adcfgclone.pl dbconfig <target context file>

perl adcfgclone.pl dbconfig $CONTEXT_FILE

where target context file is: <RDBMS ORACLE_HOME>/appsutil/

[oracle@ebsEBSTESTdb bin]$ perl adcfgclone.pl dbconfig $CONTEXT_FILE

Step 6:

Create SPFILE and RESTART Database

Application Tier Clone configuration

As an oracle (or equivalent) OS user on the target APPS server (EBSTEST) – ebsEBSTESTapp: clone the apps tier

cd /u01/app/oracle/EBSTEST/apps/apps_st/comn/clone/bin

perl adcfgclone.pl appsTier

Autoconfig and Restart services

Shut down the application tier on each node and run autoconfig to configuration populate changes.
The cloning is complete.

About the Author

More from this Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up