R12 | Clone response file | adcfgclone automation

December 8, 2015

Hi guys

If you are familiar with R12 cloning, the entire process requires loads of input from a DBA before the cloning really starts kicking in. Now, there could be hundreds of reasons for the cloning process to fail and keeping on entering the responses for the cloning prompts are NOT at all fun, minimum for me.

So I started searching for “R12 clone response file” & google landed me in this post


Excellent way Hussein Sawwan-Oracle has explained how to create the response files for both db, apps tier.



First of all, context file to response file creation has a validation flag, which confirms the responses provided are valid throughout the response collection. This validate has a downside with the port pool selection. You will receive a port is not free error while the Oracle application is online, for which a system reboot is most recommended (rather than selecting “No” for the validation process”) after graceful shutdown of both application and database tiers.

I’m using .bash_profile files to source the environment for both my Oracle (oraprod) and Application Manager (applprod) accounts, hence I was able to shorten the efforts like following

As Oracle user (oraprod)

# cd $ORACLE_HOME/appsutil/clone/bin
# perl adclonectx.pl contextfile=$CONTEXT_FILE outfile=/u02/db.xml

Provided the responses and the db.xml was successfully created under /u02 and the context file creation log was created under /u02/log folder.

Please make sure you do “echo $CONTEXT_FILE” to check whether you $CONTEXT_FILE returns a meaningful file name!

As Application Manager user (applprod)

# cd $COMMON_TOP/clone/bin
# perl adclonectx.pl contextfile=$CONTEXT_FILE outfile=/u02/appl.xml

Now you should able to run the cloning processes using the newly cloned context files, for example

# perl adcfgclone.pl dbTier /u02/db.xml
# perl adcfgclone.pl appsTier /u02/appl.xml

That’s all folks, it works like a charm & you are NOT anymore typing in whole those lengthy paths and other variables :)




RC-50004, AC-00005: No write permissions for creating the Context file – /tmp/temp.xml

December 8, 2015

Hi guys

Linux file/folder permissions could be very confusing for a beginner, minimum for me! After these many years of interacting with Linux I still get confused deciding what rights should be given to users or groups on certain folders :)

I came across a situation where the application tier cloning was continuously failing with the title error

RC-50004, AC-00005: No write permissions for creating the Context file – /tmp/temp.xml ?

I checked the for the /tmp folder permissions and realized the application user (applmgr/appltest) had proper right permissions on /tmp folder, yet the adcfgclone will not proceed after

Do you want to preserve the Display [erp-prod:0.0] (y/n) ? : n

Target System Display [erp-prodbak:0.0] :
RC-50004: Error occurred in CloneContext:
AC-00005: No write permissions for creating the Context file - /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
Check Clone Context logfile /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1208121418.log for details.

After few attempts I came against another blog, that was explaining the situation in a different way. http://newgendba.blogspot.com/2009/08/how-to-quick-solve-this-post-clone.html

Blogger has suggested to check whether temp.xml created by another user exist in the /tmp folder, which was the actual reason in my case. I found temp.xml file created by “root” and deleted the same and cloning process just went all the way fine.


Hope this info helps few of those once in a bluemoon DBAs out there :)





Oracle Applications R12 “Emergency” Rapid Clone

October 20, 2013

There could be occasions when as an apps DBA you would be asked to provide a fresh clone either over test or development environment to address a serious issue.

Rapid Clone hierarchy usually requires a DBA to pre-clone both application & database tiers, shutting down the source system and then souring the relevant folders to target system.

Today we are going to share a minor hack which could help you, when you cannot JUST shutdown a Production instance, however the cloned instance is a mandatory element to deal with a particular situation.

(Please note, this hack is ONLY applicable to situations where the backups were made without running PRE-CLONE or errors were raised stating

  1. Control file creation failed : ORA-01503: CREATE CONTROLFILE failed
  2. Certain database files were not recognized as part of the database : ORA-01565: error in identifying file)

Errors and example scenarios as mentioned with this thread

#cd /backup

#time tar –zcvf apps.tar.gz /u01/applprod/PROD/apps/*

(use “time” to check how much time the activity has taken)

Once the application tier has been tar balled

#time tar –zcvf db.tar.gz /u01/oraprod/PROD/db/*

Wait until the tar ball created

Now you can SCP the tar balls to your target system

scp –pr *.tar.gz root@targetsystem:/backup

The approximate time to transfer a database tar ball in 100GB size should be 33-35 minutes and the application tar ball in size 31GB around 9-10 minutes

Backup (if required after running the pre-clone) of your TEST/Development instance and delete the application and database folders (make sure you have shutdown the application and database instances)

#cd /u02/oratest/TEST/db

#rm –rf *

#cd /u02/appltest/TEST

#rm –rf *

Now extract the tar balls to respective base paths

#time tar –zxvf /backup/apps.tar.gz

We are already in the folder /u02/appltest/TEST so the application instance files will be extracted in the same location

Once the extraction is over, we can go ahead with extracting the database tier files

#cd /u02/oratest/TEST/db

#tar –zxvf db.tar.gz

Wait until the extraction part is over

The real hack starts from here

#cd /u02/oratest/TEST/db/tech_st/10.2.0/appsutil

#rm –rf *

Switch to source system (Aka Production instance)

#su – oraprod

If the .bash_profile has an exclusive call for the environment sourcing, your environment will be automatically sourced, else source it

Run pre-clone for the database tier now

$perl adpreclone.pl dbTier

Once the pre-clone activities completed successfully, switch to

$cd $ORACLE_HOME/appsutil

Create a tar file

$tar –zcvf appsutil.tar.gz *

Now move the new tar file to your TEST/Development instance

$scp –pr appsutil.tar.gz root@targetsystem:/backup

From the target system, move to

#cd /u02/oratest/TEST/db/tech_st/10.2.0/appsutil

Unzip the appsutil.tar.gz

#tar –zxvf /backup/appsutil.tar.gz

Once the files are extracted, change the ownership of the base path once again

#chown –R oratest:oinstall /u02/oratest

Change the access permissions

#chmod –R 777 /u02/oratest

Now as user “oratest” you can start the database tier cloning

#su – oratest

$cd /u02/oratest/TEST/db/tech_st/10.2.0/appsutil/clone/bin

$perl adcfgclone.pl dbTier

Once the database tier cloning completes successfully, you can proceed with application tier cloning, which doesn’t require any specific hacks

Side notes:

In my case I found that the “Gather schema statistics” program was missing from the scheduled jobs list. If you are experiencing slowness with your freshly cloned instance, it is highly recommended to run the said program prior going ahead with any other activities.

Make sure you would clear the cache under global configurations.

Hope you enjoyed another “hack” from us! Our sincere thanks and gratitude to Ravi Purbia (Sr. Apps DBA Consultant) who has provided us the details about this particular hack.


for Windows7bugs