Tuesday, March 16, 2010

Cloning Release 12 Oracle Applications E-Business Suite: Part I pre-clone steps

Dear readers,

Today we begin a new series on cloning the E-Business Suite for Release 12 with Oracle Applications. In this post, we cover the pre-clone steps required to perform a successful clone for Oracle Applications R12. As an Apps DBA, the ability to quickly produce clones is mandatory to be a successful EBS DBA. The following post will show details on how to clone. First lets get started with the prep work.


Part I: Pre-Clone Steps

Unlike a regular Oracle database environment, cloning the E-Business Suite is a complex affair. You need to prepare the source and target environments before a clone operation can be performed.

Part IA: Prepare clone environments

As a precaution, I advise you to follow any pre-reqs on My Oracle Support (formerly Metalink) and to download and apply the latest AD, Autoconfig template, and Rapid Clone patches before we begin. This will save you the potential headache and risk of failed clone operations due to a patch that should have been applied before doing the cloning steps.

1. First make sure to source the environments for oracle and applmgr environments for the database and applications tiers.

2. Shutdown apps tier and run autoconfig on apps tier


$ADMIN_SCRIPTS_HOME/adstpall.sh or $INST_TOP/admin/scripts/adstpall.sh
$ADMIN_SCRIPTS_HOME/adautocfg.sh or $INST_TOP/admin/scripts/adautocfg.sh

Note: you will need to enter your password for APPS for these scripts

As a precaution, I advise you to first backup context file before cloning.


3. as applmgr user on apps tier, create the appsutil file for the pre-clone steps
Oracle supplies a script called admkappsutil.pl to generate the new appsutil file which you will need to do the pre-clone. On the applications tier as the applmgr OS user run:

perl $AD_TOP/bin/admkappsutil.pl



Review the log files from the script to ensure that no errors have occurred before taking the next step.



Scroll down and verify it worked:




Open another window or shell prompt and
as the oracle user, copy the file via ftp from the $INST_TOP/admin/out
directory to the database tier server to the $ORACLE_HOME directory



cd $ORACLE_HOME; unzip -o appsutil.zip




as oracle user, run autoconfig on the database tier

cd $ORACLE_HOME/appsutil/scripts/ where indicates _ where SID is
the database SID and hostname the database tier hostname

in our case, this SBOX_tusebs would be as follows:



Now that we have run auto config, we are ready for the pre-clone steps!

Part IB: run pre-clone scripts for database tier

Now that we have completed the required prep work for our cloning operations, we need to run the pre-clone scripts for the database and applications tiers before we can clone the environment.

Oracle Release 12 actually starting with release 11i for E-Business Suite has a suite of perl scripts that perform the heavy lifting for us in terms of these cloning scripts. First, we need to pre-clone the database tier
and then we run the pre-clone script for the apps tier. Both the Sequence and syntax are critical here or the clone will fail.

The pre-clone script for database and apps tier are called adpreclone.pl. It lives under the
$ORACLE_HOME/appsutil/scripts/ directory on the database tier.

If you are a curious DBA like me,
you can look at the script with your favorite editor such as VI or EMACS.
Here is a sneak peak at the adpreclone.pl script:



Warning (Achtung!): Do not play around and make changes
to any of these scripts without the advice of Oracle Support!

Of course, one test that I may try at a future date on my
sandbox play environment is to tweak the adpreclone.pl scripts to see if I can do something funny like run my preclone
with silly names like
perl adpreclone.pl mickeymouseDBtier
perl adpreclone.pl plutoAppsTier

Then I could call it Disney EBS Rapid Cloning!

Warning: Kids do not try changing these scripts on a production system! Tricks are for kids not silly rabbits to paraphrase my favorite cereal commercial.


OK Let's run it!

you will need to enter the APPS password for the script to execute






it runs for a few minutes and then completes without errors




we verify the status in the logfile



scroll down and check to see that all ran fine without errors




Ok so now we need to run the pre-clone script on the apps tier as the applmgr OS user. Since we are running this on Linux platform the script is a shell script.




Part IC: Run the pre-clone scripts for apps tier

The pre-clone script for apps tier is located under the $INST_TOP/admin/scripts or $ADMIN_SCRIPTS_HOME directory and is called adpreclone.sh. To execute it we logon as applmgr user and run

perl $INST_TOP/admin/scripts/adpreclone.sh appsTier as shown below and you need to enter the APPS password
at the prompt.

Be sure to use the syntax EXACTLY as shown above or the preclone will FAIL!





This will run for a short time maybe 5-10 minutes and then complete. Verify that your preclone ran without errors. Check the log file generated by the adpreclone.sh script for the apps tier to ensure no errors have occurred as shown in the examples below.



Scroll down the remainder of the log file:



Now we are finally ready to clone! In the next blog post, I will show you the actual cloning steps to clone R12 EBS. Stay tuned!

Cheers,
Ben Prusinski

1 comment:

Unknown said...

Really a nice post..!!
Keep up the good work.