Friday, November 2, 2012

Configuring the E-Business DB Tier on Amazon

Relevant ML note is 1205963.1

Our variables we will use :  

  1. Apps password : must be apps or nothing works !!!  
  2. System hostname : this will be the internal hostname.  usually starts with ip-xxx=xxx=xxx=xxx.ec2.internal 
  3. Target is RAC : No 
  4. Server Node > same as hostname
  5. SID : VISION
  6. Target Base : /u01/E-BIZ/db
  7. utl_file_dir: /usr/tmp 
  8. DATA_TOPs  1
  9. DATA_TOP Location /u01/E-BIZ/db/apps_st/data
  10. RDBMS OH /u01/E-BIZ/db/tech_st/11.2.0.2
  11. preserve display : n
  12. Target display : default 
  13. Same Ports : n
  14. Port Pool : 0 
(All above as per manual )



Log on and su to oracle.

cd /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin

Execute the DB tier post-clone script




perl adcfgclone.pl dbTier


                     Copyright (c) 2002 Oracle Corporation

                    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/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/java:/u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/xmlparserv2.jar:/u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_20475.lst -stage /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone  2> /tmp/adcfgclone_20475.err; echo $? > /tmp/adcfgclone_20475.res

Log file located at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1102114625.log

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

Target System Hostname (virtual or normal) [ip-foo] :

Target Instance is RAC (y/n) [n] :
ERROR: Context creation not completed successfully.
For additional details review the file /tmp/adcfgclone_20475.err if present.

[oracle 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/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/java:/u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/xmlparserv2.jar:/u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_20553.lst -stage /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone  2> /tmp/adcfgclone_20553.err; echo $? > /tmp/adcfgclone_20553.res

Log file located at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1102114637.log

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

Target System Hostname (virtual or normal) [ip-] :

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

Target System Database SID : VISION

Target System Base Directory : /u01/E-BIZ/db

Target System utl_file_dir Directory List : /usr/tmp

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

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

Target System RDBMS ORACLE_HOME Directory [/u01/E-BIZ/db/db/tech_st/11.1.0] : /u01/E-BIZ/db/tech_st/11.2.0.2

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

Target System Display [ip-: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] : 0

Checking the port pool 0
done: Port Pool 0 is free
Report file located at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/temp/portpool.lst
Complete port information available at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/temp/portpool.lst

Creating the new Database Context file from :
  /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/VISION_.xml

Log file located at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1102114637.log
Check Clone Context logfile /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/clone/bin/CloneContext_1102114637.log for details.

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

Beginning database tier Apply - Fri Nov  2 11:50:13 2012

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


Finally....

Log file located at /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/log/VISION_/ApplyDBTier_11021348.log
  /     15% completed

Completed Apply...
Fri Nov  2 13:53:29 2012

Starting database listener for VISION:
Running:
/u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/scripts/VISION_/addlnctl.sh start VISION
Logfile: /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/log/VISION_/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Starting listener process VISION ...


Listener VISION has already been started.


addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/E-BIZ/db/tech_st/11.2.0.2/appsutil/log/VISION_/addlnctl.txt for more information ...


Had to repeat twice as it wasn't clear that the precloned db was a locked apps password.  However all OK now we will fix the apps password at the very end !




2 comments:

Anonymous said...

how do we restart the service next time we reboot the instance ?

Chris Slattery at Version 1 said...

You can put something in rc.local if you like or add it as a service with chkconfig, that sort of thing.

1. The intent is to focus here on e-Business related stuff not Linux based stuff.

2. Secondly, the instance restart should be investigated as to why it happened. Database restarts should be very rare.