Oracle EBS R12(12.0.x) | Disable concurrent programs executing immediately after a clone

November 28, 2017

Hi guys

One of the annoyances suffered by business is the alerts and concurrent programs those start sending highly confusing messages to users immediately after a cloning completion. Application tier cloning finishes by trying to start all related services after a successful cloning. Hence the best method to stop the concurrent manager/alerts from firing up is NOT to let the cloning process start application tier level services, so that you can disable alerts/concurrent programs those are NOT required by the cloned instance.

First step is to alter the $COMMON_TOP/clone/bin/adcfgclone.pl (perl script, please refer the image)

image

Change the portion in the highlighted block as shown below. This will stop the clone script from kick starting the application services after a successful clone.

elsif (!($PLATFORM eq "win32")) {
print "\n Not Starting application Services for $s_dbSid:\n";
#bugfix:5838814 subgovin
#runPipedCmd("$s_config_home/admin/scripts/adstrtal.$scrExt -nopromptmsg", "$s_apps_user", "$gConfig{'appspass'}");
}

Now, you may proceed to disable all or selected alerts/concurrent programs using backend before starting the Application services.

Please note, this workaround is ONLY tested on 12.0.x releases of Oracle Applications. Please adjust to your environments.

References:

http://onlineappsdba.blogspot.com/2008/06/prevent-concurrent-requests-executing.html

http://oracle-latest-technology.blogspot.com/2013/11/how-to-disable-all-scheduled-concurrent.html

regards,

rajesh

Advertisements

Oracle E-Business Suite R12.0 | Automating clone process

February 16, 2016

Hi guys

A clone is the exact replica of a production instance, against what you do all tests, custom development and patch deployments to insure that your attempts are NOT going to break the PRODUCTION instance once such are moved over to.

How often consultants & users may request for a fresh clone (with latest data) depends upon many factors. During the implementation time, a DBA could be bombarded with requests for cloning almost once in couple of days. Although I am “not a dba”, I have been doing cloning to learn & understand the technology from last couple of years time & trust me, it is NOT at all fun. Especially once after you are familiar with the tasks.

Throughout last few months I was trying to “fully automate” the entire cloning process and made significant advancements with the process. I will share my experiences with you today

Scenario:

We have a cron job initiated by “root” user, starting by 2:30 PM every Friday, that shuts down the application and database after running pre-cloning. The same script makes tar balls for both the database and application nodes in separate files and then copies the tar balls to our TEST instance server.

Logically once the tar balls are copied to TARGET (TEST) server, following activities are expected from the DBA

  1. Stop the application & database instances those are online in the TEST server
  2. Extract the tar balls copied from PRODUCTION instance to relevant folders
  3. Clone database tier, followed by application tier
  4. Tune the database with TEST server specific SGA/job queue processes etc parameters

What if I am too lazy & a scripting junkey who wants to automate the entire activities using shell scripts? The following demonstrates such an attempt

Why not a cron job? ;)

The first step will be, creating auto response files for both database and application nodes. I have already detailed a how to here

ebsclone.sh | This shell script calls a number of other shell scripts to facilitate the entire cloning process

Please note, my Oracle database user is “oraprod” and application manager is “applprod”. If you are planning to copy the below script(s), make sure you change the physical paths, user details according to your specific environment.

Both the database and application manager user accounts are enhanced with .bash_profile values. Hence most of my scripts will not populate the environment variables prior executing other scripts.

I am using “expect”, that YOU must install, if not already installed in order to automate the cloning process. If you are using Oracle linux, you can install expect by issuing the following command:

yum install expect -y
#!/bin/bash
# As a precaution to make sure the port pool is available during automated
# Cloning, we will kill all orphaned processes those were not closed during
# DB, APPS stop

# Kill all processes for both oraprod & applprod users
echo "Killing all processes for Oracle user"
pkill -u oraprod
echo "Killing all processes for Application user"
pkill -u applprod
echo "All processes for both Oracle and Application users were killed"

sleep 30

echo "$(date)"

#Remove the existing physical folder for database files
cd /u01
find oraprod -delete
echo "finished deleting Oracle top at $(date)"
#Extract files for database top from the cold backup archive
echo "Extract database backup file at $(date)"
time tar -zxf /u02/backup/PROD_DAILY_BACKUP_db.tar.gz
echo "Finished extracting database backup file at $(date)"

#Remove the existing physical folder for application files

cd /u03
find applprod -delete
echo "finished deleting Application top at $(date)"

#Extract files for application top from the cold backup archive
echo "Extract application backup file at $(date)"
time tar -zxf /u02/backup/PROD_DAILY_BACKUP_apps.tar.gz u06/applprod/PROD/apps
echo "Finished extracting application backup file at $(date)"

#Move the files around based on your configuration files (db.xml & apps.xml)

mv /u01/u05/oraprod /u01
mv /u03/u06/applprod /u03

#Change the ownership of the folders, so that corresponding users could read & execute files

chown -R oraprod:oinstall /u01/oraprod
chown -R applprod:oinstall /u03/applprod

########################################
#Start the cloning
########################################

echo "Database cloning phase starts now, $(date)"

#su - oraprod -c "perl /u01/oraprod/PROD/db/tech_st/10.2.0/appsutil/clone/bin/adcfgclone.pl dbTier /u01/clonescripts/db.xml"

/root/scripts/dbclone.sh

sleep 30

echo "Application cloning phase starts now, $(date)"

# su - applprod -c "perl /u03/applprod/PROD/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier /u01/clonescripts/apps.xml"

/root/scripts/appsclone.sh

echo "EBS Cloning completed, $(date)"
######################################
#Optional steps for changing database SGA parameters,
#startup configuration files to spfile etc
######################################
echo "Changing database parameters, $(date)"

/root/scripts/dbfix.sh

echo "Done! Application online with changed database parameters, $(date)"

Now I will copy the code for each script called within the ebsclone.sh script
dbclone.sh | script enabled with expect which will not ask for the apps password

#!/usr/bin/expect -f
set force_conservative 0  ;

# set to 1 to force conservative mode even if
# script wasn't run conservatively originally

if {$force_conservative} {
        set send_slow {1 .1}
        proc send {ignore arg} {
                sleep .1
                exp_send -s -- $arg
        }
}

set timeout -1

spawn su - oraprod -c "perl /u01/oraprod/PROD/db/tech_st/10.2.0/appsutil/clone/bin/adcfgclone.pl dbTier /u01/clonescripts/db.xml"

match_max 100000

expect -exact "\r
Enter the APPS password : "
send -- "apps\r"

expect eof

appsclone.sh | script enabled with expect which will not ask for the apps password

#!/usr/bin/expect -f
set force_conservative 0  ;

# set to 1 to force conservative mode even if
# script wasn't run conservatively originally

if {$force_conservative} {
        set send_slow {1 .1}
        proc send {ignore arg} {
                sleep .1
                exp_send -s -- $arg
        }
}

set timeout -1

spawn su - applprod -c "perl /u03/applprod/PROD/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier /u01/clonescripts/apps.xml"

match_max 100000

expect -exact "\r
Enter the APPS password : "
send -- "apps\r"

expect eof

dbfix.sh | Changing database parameters like SGA, job queue processes etc

#!/bin/bash
su - applprod -c "/u03/applprod/PROD/inst/apps/PRODBAK_erp-prodbak/admin/scripts/adstpall.sh apps/apps"
su - oraprod -c /root/scripts/dbalter.sh
su - applprod -c "/u03/applprod/PROD/inst/apps/PRODBAK_erp-prodbak/admin/scripts/adstrtal.sh apps/apps"

Finally dbalter.sh | All database alter commands are included within this file

#!/bin/bash
export ORACLE_HOME=/u01/oraprod/PROD/db/tech_st/10.2.0
export ORACLE_SID=PRODBAK

#http://www.cyberciti.biz/faq/unix-linux-test-existence-of-file-in-bash/
#Check whether spfile already exist
file="/u01/oraprod/PROD/db/tech_st/10.2.0/dbs/spfilePRODBAK.ora"
if [ -f "$file" ]
then
	echo "$file found. Aborting database configuration now"
exit;
else
	echo "$file not found."
fi

sqlplus "/ as sysdba" <<EOF
create spfile from pfile;
shutdown immediate;
startup;
alter system set sga_max_size=8G scope=spfile;
alter system set sga_target=8G scope=spfile;
alter system set job_queue_processes=10 scope=both;
shutdown immediate;
! cp /u01/oraprod/PROD/db/tech_st/10.2.0/dbs/initPRODBAK.ora /u01/oraprod/PROD/db/tech_st/10.2.0/dbs/initPRODBAK.ora.original
! >/u01/oraprod/PROD/db/tech_st/10.2.0/dbs/initPRODBAK.ora
! echo "spfile=/u01/oraprod/PROD/db/tech_st/10.2.0/dbs/spfilePRODBAK.ora" >>/u01/oraprod/PROD/db/tech_st/10.2.0/dbs/initPRODBAK.ora
startup;
exit;
EOF

The above five scripts should do what they are meant to. Just copy the files to same folder
Change the execute mode of ebsclone.sh

chmod +x ebsclone.sh

and execute the ebsclone.sh as “root” (attempts made with other users will fail the cloning)

#./ebsclone.sh

Prior attempting, please make sure all the above scripts are modified with absolute paths, referring to your existing partitions & other

Download the scripts here

References:

Sample expect script

https://community.oracle.com/thread/2558592?start=0&tstart=0

Linux: Find whether a file already exist

http://www.cyberciti.biz/faq/unix-linux-test-existence-of-file-in-bash/

Happy cloning!


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.

regards,

for Windows7bugs

admin


Oracle R12 Vision Instance 12.1.3 Cloning – step by step instructions

October 8, 2013

*General Note: The below instructions, which were successfully completed and tested are from the prospective of a person who do not have any previous knowledge about cloning, advance level Linux administration etc. If you find it too amateurish, please let us know with the comments session and corrections. We will be more than happy to amend the post.

Most probably few of the errors we received with write permissions missing to /tmp for applprod user should because of missing Rapid Clone patches.

Prerequisites

Oracle VirtualBox (We don’t support a physical system as detailing a cloning for a Linux system wouldn’t fit entirely within the discussed topic)

Minimum 4GB of memory to spare for the Virtual Machine

500GB of free hard disk space (If you don’t have additional 500GB, you can use the same source machine for cloning, by backing up the necessary folders and after removing the E-BIZ folder entirely)

Step #1

Create a folder on a partition where you have 500GB or more space and call it “ebiznew”

Copy and paste both System.vdi and ebs1211db.vdi from your other virtual machine folder, where you have a properly working Vision Instance (We are not going to clone the existing VM using the VirtualBox clone utility)

Change the uuid for both System.vdi and ebs1211db.vid

E:\ebiznew>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands
sethduuid System.vdi
UUID changed to: 5dbdd6e3-c8ff-431d-bdd8-edf31c3012fb

E:\ebiznew>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands
sethduuid ebs1211db.vdi
UUID changed to: 05068998-dc4d-46ef-8f8f-1ae07b786bfa

Now start creating a new VM using VirtualBox and attach System.vdi and ebs1211db.vdi under SATA

As we have changed the kernel to NON Xen, you should able to boot up the VM immediately

Once logged in as “root”, let us drop the existing E-BIZ/* folders for cloning purpose

As root

#cd /u01

#rm -rf *

Sit back, it will take a while for the system to delete the folders and contents

Once the folders and file are deleted create a new folder called “backup” within /u01

#mkdir backup

 

Change the hostname, IP address etc for the new VM

Make sure from your HOST box you can ping the new VM by both hostname and IP address

 

*Special note: If you have a total of 8GB(only) memory with your box, you have to change the memory allocations for both your VMs (one which already has the Vision instance configured & the new VM on which you are going to execute the cloning) to 2GB each

Boot up you VM with Vision instance configured and running (Aka source system)

Edit /etc/hosts file and add the IP address and hostname of your new VM

As root

vi /etc/hosts

192.168.0.50 ebs1213.rhome.com ebs1213

Where ebs1213 is the new hostname you have set for the new VM. Adjust it according to the name you have chosen

Save and exit the vi editor and try to ping the new VM from your source VM

ping ebs1213.rhome.com

Make sure you are getting ping replies from the new VM

 

Start dbTier and appsTier sequentially and make sure that you can access the application

Step #2

Now we are all set to “try” our first cloning process

Prior cloning we MUST prepare the source system for cloning. Hence switch user to “oracle” and switch to following folder (Adjust the path according to your environment)

cd /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/scripts/VIS_appvis

$perl adpreclone.pl dbTier

(provide the apps password when it is promoted)

The pre-clone should complete within few minutes time, and if there are no errors (in our case), we can proceed to prepare the application tier now

As user “Oracle” switch to

/u01/E-BIZ/inst/apps/VIS_appvis/admin/scripts

$perl adpreclone.pl appsTier

(provide the apps password when it is promoted)

Let the pre-clone procedure complete.

Once the pre-clone procedure has been completed, shutdown the application tier and database tier sequentially

Check for FNDLIBR processes, until the count reaches two(2)

$ps –ef | grep FNDLIBR | wc –l

Now we have to copy the database and application tier folders to our target VM. For our exercise we will create individual tar.gz files for both database and application folders

We will create a new folder with /u01 on the source system

As root

#cd /u01

#mkdir backup

#cd backup

# time tar -zcvf db.tar.gz /u01/E-BIZ/db/*

This will create a new tar ball with the name “db.tar.gz” inside /u01/backup folder

Sit back and relax, it is going to take some time

Once the tar process finishes, we will attempt to create a tar ball for the application tier

#time tar -zcvf apps.tar.gz /u01/E-BIZ/apps/apps_st/*

The entire tar processes may take more than couple of hours time (Depending upon the resources you have allocated for the source VM)

Now we will copy the tar files created to our target system using SCP

As root, from /u01/backup folder

#scp –pr db.tar.gz root@ebs1213:/u01/backup

You will be given a warning, accept the prompt. After that, you will be asked to enter the root password for your target machine, in our case “ebs1213”

If your vision instance is fresh without much data added after it was put online, the tar ball will be something less than 30GB, and the transfer should complete within 16-20 minutes time

Once the database tar ball transferred you can proceed with transferring your application tar bar

#scp –pr apps.tar.gz root@ebs1213:/u01/backup

Amount of time required will vary depending upon the resources available. Wait until the transfer completes

Now you can shutdown your source system (So that you can release the memory/processors allocated and increase them with your new VM on which we will continue with the cloning process)

Shutdown your new VM (Target system)

Make changes to your new VM with more memory, processors etc

Boot up the new VM and logon to the VM as root

Step #3

We are going to MIMIC a production instance with our new VM (Please note, do not attempt to violate Oracle’s licensing agreements, our intention is not to help you with doing something which is against Oracle’s licensing terms and Vision instance usage)

We will create two new users and add them to existing oinstall and dba groups

As root

Now switch to /u01 folder (or other mount point as you have created it)

We will create a number of folders, which will be entirely different from the Vision Instance structure

#mkdir oraprod

#cd oraprod

#mkdir PROD

#cd PROD

#mkdir db

#cd /u01

#mkdir applprod

#cd applprod

#mkdir PROD

#cd PROD

#mkdir apps

Now we will change the ownership & permissions for /u01/oraprod & /u01/applprod

As root

chown -R oraprod:dba /u01/oraprod

chmod -R 777 /u01/oraprod

chown -R oraprod:dba /u01/applprod

chmod -R 777 /u01/applprod

Now we will extract the tar balls to appropriate folders

#cd /u01/oraprod/PROD/db

#time tar –zxvf /u01/backup/db.tar.gz

Approximately the extraction process will take around 3 hours for the database tar ball and around one hour for the application tar ball

Once the database tar ball extracted, we will start extracting the application tar ball

cd /u01/applprod/PROD/apps

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

Now we can start the actual cloning process

Step #4 Cloning the database tier

[root@visclone u01]# su - oraprod
[oraprod@ebs1213 ~]$ cd /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin
[oraprod@ebs1213 bin]$

#
[root@visclone u01]# su - oraprod
[oraprod@ebs1213 ~]$ cd /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin
[oraprod@ebs1213 bin]$ perl adcfgclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password :

Running:
/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/java:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/xmlparserv2.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_3095.lst -stage /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone  2> /tmp/adcfgclone_3095.err; echo $? > /tmp/adcfgclone_3095.res

Log file located at /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1007224741.log

Provide the values required for creation of the new Database Context file.

Target System Hostname (virtual or normal) [ebs1213] :

Target Instance is RAC (y/n) [n] :

Target System Database SID : PROD

Target System Base Directory : /u01/oraprod

Target System utl_file_dir Directory List : /usr/tmp

Number of DATA_TOP's on the Target System [1] : 1

Target System DATA_TOP Directory 1 [/u01/E-BIZ/db/apps_st/data] : /u01/oraprod/PROD/db/apps_st/data

Target System RDBMS ORACLE_HOME Directory [/u01/oraprod/db/tech_st/11.1.0] : /u01/oraprod/PROD/db/tech_st/11.2.0.2

Do you want to preserve the Display [appvis:0.0] (y/n)  : n

Target System Display [ebs1213:0.0] :

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 42

Database cloning will kick start now, and should complete without throwing errors. Some sample outputs like below

Checking the port pool 42
done: Port Pool 42 is free
Report file located at /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/temp/portpool.lst
Complete port information available at /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/temp/portpool.lst

Creating the new Database Context file from :
  /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/PROD_ebs1213.xml

Log file located at /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1007224741.log
Check Clone Context logfile /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1007224741.log for details.

Running Rapid Clone with command:
perl /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/adclone.pl java=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre mode=apply stage=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/PROD_ebs1213.xml showProgress contextValidated=true
Running:
perl /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/adclone.pl java=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre mode=apply stage=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/PROD_ebs1213.xml showProgress contextValidated=true
APPS Password :

Beginning database tier Apply - Mon Oct  7 22:50:46 2013

/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/u01/oraprod/PROD/db/tech_st/11.2.0.2/oui -classpath /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/xmlparserv2.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/ojdbc5.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/java:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/oui/ewt3.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/oui/share.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/oui/srvm.jar:/u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone/jlib/ojmisc.jar   oracle.apps.ad.clone.ApplyDBTier -e /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/PROD_ebs1213.xml -stage /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/clone   -showProgress
APPS Password : Log file located at /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/log/PROD_ebs1213/ApplyDBTier_10072250.log
  /      0% completed

Once the cloning completes without errors, the database instance will start automatically and you can proceed with cloning the application tier

Step #5 Cloning the application tier

[oraprod@visclone u01]# su - oraprod
[applprod@ebs1213 ~]$ cd /u01/oraprod/PROD/apps/apps_st/comn/clone/bin
[applprod@ebs1213 bin]$

[applprod@ebs1213 bin]$ perl adcfgclone.pl appsTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password :

Running:
/u01/applprod/PROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u01/applprod/PROD/apps/apps_st/comn/clone/jlib/java:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /u01/applprod/PROD/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_11049.lst -stage /u01/applprod/PROD/apps/apps_st/comn/clone  2> /tmp/adcfgclone_11049.err; echo $? > /tmp/adcfgclone_11049.res

Log file located at /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1007230323.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [ebs1213] :

Target System Database SID : PROD

Target System Database Server Node [ebs1213] :

Target System Database Domain Name [rhome.com] :

Target System Base Directory : /u01/applprod

Target System Tools ORACLE_HOME Directory [/u01/applprod/apps/tech_st/10.1.2] : /u01/applprod/PROD/apps/tech_st/10.1.2

Target System Web ORACLE_HOME Directory [/u01/applprod/apps/tech_st/10.1.3] :  /u01/applprod/PROD/apps/tech_st/10.1.3

Target System APPL_TOP Directory [/u01/applprod/apps/apps_st/appl] :  /u01/applprod/PROD/apps/apps_st/appl

Target System COMMON_TOP Directory [/u01/applprod/apps/apps_st/comn] :  /u01/applprod/PROD/apps/apps_st/comn

Target System Instance Home Directory [/u01/applprod/inst] :  /u01/applprod/PROD/inst      
Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] :

Target System Other Services [disabled] :

Do you want to preserve the Display [appvis:0.0] (y/n)  : n

We had an error, applprod user failing to write to /tmp folder

Target System Display [ebs1213: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_1007230323.log for details.

ERROR: Context creation not completed successfully.
For additional details review the file /tmp/adcfgclone_11049.err if present.

 

Hence I have changed the ownership & permissions for  /tmp folder

login as: root
root@ebs1213.rhome.com's password:
Last login: Mon Oct  7 16:18:34 2013 from 192.168.0.200

[root@ebs1213/]# ls -al | grep tmp
drwxrwxrwx   7 root   root     20480 Oct  7 23:06 tmp
[root@ebs1213/]# chown -R applprod:dba /tmp
[root@ebs1213/]# chmod -R 777 /tmp
[root@ebs1213/]# ls -al | grep tmp
drwxrwxrwx   7 applprod dba      20480 Oct  7 23:06 tmp
[root@ebs1213/]#

Re-run the application tier cloning as user “applprod”

Checking the port pool 42
done: Port Pool 42 is free
Report file located at /u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/out/portpool.lst
Complete port information available at /u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /u01/oraprod/PROD/db/tech_st/11.2.0.2/appsutil/outbound/PROD_ebs1213
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 1

Creating the new APPL_TOP Context file from :
  /u01/applprod/PROD/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
  /u01/applprod/PROD/inst/apps/PROD_ebs1213/appl/admin/PROD_ebs1213.xml

Log file located at /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1007233459.log
Check Clone Context logfile /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1007233459.log for details.

Running Rapid Clone with command:
perl /u01/applprod/PROD/apps/apps_st/comn/clone/bin/adclone.pl java=/u01/applprod/PROD/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/u01/applprod/PROD/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/applprod/PROD/inst/apps/PROD_ebs1213/appl/admin/PROD_ebs1213.xml showProgress contextValidated=true
Running:
perl /u01/applprod/PROD/apps/apps_st/comn/clone/bin/adclone.pl java=/u01/applprod/PROD/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/u01/applprod/PROD/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/applprod/PROD/inst/apps/PROD_ebs1213/appl/admin/PROD_ebs1213.xml showProgress contextValidated=true
APPS Password :

Beginning application tier Apply - Mon Oct  7 23:36:52 2013

/u01/applprod/PROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/oui -classpath /u01/applprod/PROD/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/java:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/oui/share.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/u01/applprod/PROD/apps/apps_st/comn/clone/jlib/ojmisc.jar  oracle.apps.ad.clone.ApplyAppsTier -e /u01/applprod/PROD/inst/apps/PROD_ebs1213/appl/admin/PROD_ebs1213.xml -stage /u01/applprod/PROD/apps/apps_st/comn/clone    -showProgress
APPS Password : Log file located at /u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/log/ApplyAppsTier_10072336.log
  -      0% completed

  Completed Apply...
Mon Oct  7 23:43:12 2013


Do you want to startup the Application Services for PROD? (y/n) [y] : y

Starting application Services for PROD:
Running:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adstrtal.sh -nopromptmsg

You are running adstrtal.sh version 120.15.12010000.3

The logfile for this session is located at /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adstrtal.log
Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adopmnctl.sh start
script returned:
****************************************************

You are running adopmnctl.sh version 120.6.12010000.5

Starting Oracle Process Manager (OPMN) ...
opmnctl: opmn started.

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adopmnctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adalnctl.sh start
script returned:
****************************************************

adalnctl.sh version 120.3

Checking for FNDFS executable.
Starting listener process APPS_PROD.

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adalnctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adapcctl.sh start
script returned:
****************************************************

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: opmn is already running.
opmnctl: starting opmn managed processes...

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adapcctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adoacorectl.sh start
script returned:
****************************************************

You are running adoacorectl.sh version 120.13

Starting OPMN managed OACORE OC4J instance  ...

adoacorectl.sh: exiting with status 0

adoacorectl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adoacorectl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adformsctl.sh start
script returned:
****************************************************

You are running adformsctl.sh  version 120.16.12010000.3

Starting OPMN managed FORMS OC4J instance  ...
Calling txkChkFormsDeployment.pl to check whether latest FORMSAPP.EAR is deployed...
Program : /u01/applprod/PROD/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl started @ Mon Oct  7 23:44:32 2013

*** Log File = /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/rgf/TXK/txkChkFormsDeployment_Mon_Oct_7_23_44_31_2013/txkChkFormsDeployment_Mon_Oct_7_23_44_31_2013.log

File "/u01/applprod/PROD/apps/tech_st/10.1.3/j2ee/forms/applications/forms/formsweb/WEB-INF/lib/frmsrv.jar" exists. Proceeding to check the size...

=============================================
*** Latest formsapp.ear has been deployed ***
=============================================


Program : /u01/applprod/PROD/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl completed @ Mon Oct  7 23:44:32 2013

Perl script txkChkFormsDeployment.pl got executed successfully



adformsctl.sh: exiting with status 0

adformsctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adformsctl.txt for more information ...


.end std out.
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/rgf/TXK/txkChkFormsDeployment_Mon_Oct_7_23_44_31_2013/txkChkFormsDeployment_Mon_Oct_7_23_44_31_2013.log

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adoafmctl.sh start
script returned:
****************************************************

You are running adoafmctl.sh version 120.8

Starting OPMN managed OAFM OC4J instance  ...

adoafmctl.sh: exiting with status 0

adoafmctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adoafmctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/adcmctl.sh start
script returned:
****************************************************

You are running adcmctl.sh version 120.17.12010000.5

Starting concurrent manager for PROD ...
Starting PROD_1007@PROD Internal Concurrent Manager
Default printer is noprint

adcmctl.sh: exiting with status 0


adcmctl.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adcmctl.txt for more information ...


.end std out.

.end err out.

****************************************************


Executing service control script:
/u01/applprod/PROD/inst/apps/PROD_ebs1213/admin/scripts/jtffmctl.sh start
script returned:
****************************************************

You are running jtffmctl.sh version 120.3

Validating Fulfillment patch level via /u01/applprod/PROD/apps/apps_st/comn/java/classes
Fulfillment patch level validated.
Starting Fulfillment Server for PROD on port 9342 ...

jtffmctl.sh: exiting with status 0


.end std out.

.end err out.

****************************************************


All enabled services for this node are started.

adstrtal.sh: Exiting with status 0

adstrtal.sh: check the logfile /u01/applprod/PROD/inst/apps/PROD_ebs1213/logs/appl/admin/log/adstrtal.log for more information ...

[applprod@ebs1213 bin]$

Rolled back /tmp ownership

[root@ebs1213 /]# chown -R root:root /tmp
[root@ebs1213 /]# ls -al | grep tmp
drwxrwxrwx   7 root   root     28672 Oct  7 23:44 tmp
[root@ebs1213 /]#

Try to access your newly cloned instance through http://ebs1213.rhome.com:8042/

You should be provided with a login page. Use either sysadmin or other user you have created earlier, change site name etc and enjoy!

I hope you have enjoyed another “beginner” post form windows7bugs

for windows7bugs

rajesh