Friday, September 26, 2014

OUI-67028:Inventory load failed... OPatch cannot load inventory for the given Oracle Home


Error:

[Sep 26, 2014 9:30:25 AM]    Patch history file: /app/oracle/product/11.2.0.4/cfgtoollogs/opatch/opatch_history.txt
[Sep 26, 2014 9:30:25 AM]    Starting LsInventorySession at Fri Sep 26 09:30:25 PDT 2014
[Sep 26, 2014 9:30:25 AM]    List of Homes on this system:
[Sep 26, 2014 9:30:25 AM]    OUI-67028:Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
                             Possible causes are:
                                Oracle Home dir. path does not exist in Central Inventory
                                Oracle Home is a symbolic link
                                Oracle Home inventory is corrupted
[Sep 26, 2014 9:30:25 AM]    OUI-67073:LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo
[Sep 26, 2014 9:30:25 AM]    Finishing LsInventorySession at Fri Sep 26 09:30:25 PDT 2014


Solution

Step 1. Check the oraInst.loc file
cat /etc/oraInst.loc
inventory_loc=/app/oracle/product/11.2.0.4/oraInst.loc
inst_group=dba

Check the inventory is exist in the location and in file entries in particular sequence

Step 2. If first step is ok, Then you need to register the Oracle Home in the inventory

# cd $ORACLE_HOME/oui/bin
# ./attachHome.sh

or

# cd $ORACLE_HOME/oui/bin
#./runInstaller -silent -attachHome -invPtrLoc /app/oracle/product/11.2.0.4/oraInst.loc ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=ORAHOME11Gr24

Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 153840 MB    Passed
The inventory pointer is located at /app/oracle/product/11.2.0.4/oraInst.loc
The inventory is located at /app/oracle/product/oraInventory
'AttachHome' was successful.
DBA
oracle@dba:/app/oracle/product/11.2.0.4/oui/bin[31] cd ..


Check the inventory file.

DBA oracle@dba:/app/oracle/product/oraInventory/ContentsXML[30] cat inventory.xml


DBA
oracle@dba:/app/oracle/product/oraInventory/ContentsXML[31]

Monday, September 15, 2014

Clone R12.1.3


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 let’s get started with the prep work.

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.
 

1) DB Tier preparation for Cloning

Login as Oracle User and run the preclone Step.
oracle@linux64:/remote/app/oracle//db/tech_st/11.2.0/appsutil/scripts/_linux64[9] perl  adpreclone.pl dbTier

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

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.5

Enter the APPS User Password:
Running:
perl /remote/app/oracle//db/tech_st/11.2.0/appsutil/bin/adclone.pl java=/remote/app/oracle//db/tech_st/11.2.0/jdk/jre mode=stage stage=/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml showProgress
APPS Password :

Beginning database tier Stage - Fri Sep 12 16:26:52 2014

/remote/app/oracle//db/tech_st/11.2.0/jdk/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/remote/app/oracle//db/tech_st/11.2.0/oui -classpath /remote/app/oracle//db/tech_st/11.2.0/lib/xmlparserv2.jar:/remote/app/oracle//db/tech_st/11.2.0/jdbc/lib/ojdbc5.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/java:/remote/app/oracle//db/tech_st/11.2.0/oui/jlib/OraInstaller.jar:/remote/app/oracle//db/tech_st/11.2.0/oui/jlib/ewt3.jar:/remote/app/oracle//db/tech_st/11.2.0/oui/jlib/share.jar:/remote/app/oracle//db/tech_st/11.2.0/oui/jlib/srvm.jar:/remote/app/oracle//db/tech_st/11.2.0/jlib/ojmisc.jar   oracle.apps.ad.clone.StageDBTier -e /remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml -stage /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone -tmp /tmp -method CUSTOM    -showProgress
APPS Password :
Log file located at /remote/app/oracle//db/tech_st/11.2.0/appsutil/log/_linux64/StageDBTier_09121626.log

  |     50% completed

Completed Stage...
Fri Sep 12 16:27:47 2014


2) Apps Tier preparation for Cloning



Login as applmgr user and run the preclone step.


applmgr@linux64:/remote/app/applmgr//inst/apps/_linux64/admin/scripts[106] perl adpreclone.pl appsTier

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

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.5

Running:
perl /remote/app/applmgr//apps/apps_st/appl/ad/12.0.0/bin/adclone.pl java=/remote/app/applmgr//apps/tech_st/10.1.3/appsutil/jdk mode=stage stage=/remote/app/applmgr//apps/apps_st/comn/clone component=appsTier method= appctx=/remote/app/applmgr//inst/apps/_linux64/appl/admin/_linux64.xml showProgress
APPS Password :
method defaulted to CUSTOM


Beginning application tier Stage - Fri Sep 12 17:00:32 2014

/remote/app/applmgr//apps/tech_st/10.1.3/appsutil/jdk/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/oui -classpath /remote/app/applmgr//apps/tech_st/10.1.3/lib/xmlparserv2.jar:/remote/app/applmgr//apps/tech_st/10.1.3/jdbc/lib/ojdbc14.jar:/remote/app/applmgr//apps/apps_st/comn/java/classes:/remote/app/applmgr//apps/tech_st/10.1.3/oui/jlib/OraInstaller.jar:/remote/app/applmgr//apps/tech_st/10.1.3/oui/jlib/ewt3.jar:/remote/app/applmgr//apps/tech_st/10.1.3/oui/jlib/share.jar:/remote/app/applmgr//apps/tech_st/10.1.3/oui/jlib/srvm.jar:/remote/app/applmgr//apps/tech_st/10.1.3/jlib/ojmisc.jar  oracle.apps.ad.clone.StageAppsTier -e /remote/app/applmgr//inst/apps/_linux64/appl/admin/_linux64.xml -stage /remote/app/applmgr//apps/apps_st/comn/clone -tmp /tmp -method CUSTOM   -showProgress

Log file located at /remote/app/applmgr//inst/apps/_linux64/admin/log/StageAppsTier_09121700.log

  \     80% completed

Completed Stage...
Fri Sep 12 17:01:09 2014
applmgr@linux64:/remote/app/applmgr//inst/apps/_linux64/admin/scripts[107]




3) Application copy


Shutdown all the services, this is not mandatory step.

Copy the source system application tier file system to the target system, using your preferred method.

APPL_TOP

COMMON_TOP

ORACLEAS_10.1.2_ORACLE_HOME

ORACLEAS_10.1.3_ORACLE_HOME



4) Database copy

Shutdown the Database

copy the source database ORACLE_HOME to the target system.
copy the database (.dbf) files from the source to the target system




Activities on target


Do not set the environment files for the database tier! We need a clean slate for the database tier clone procedure.

1) DBTier Configuration and then start the Target System database Server



Login as oracle user and execute the clone procedure.

oracle@linux64:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin[9] 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:
/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/java:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/xmlparserv2.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_13167.lst -stage /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone  2> /tmp/adcfgclone_13167.err; echo $? > /tmp/adcfgclone_13167.res

Log file located at /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0913163907.log

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

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

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

Target System Database SID :

Target System Base Directory : /remote/app/oracle

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 [/remote/oradata/TDBNAME] : /remote/oradata/

Target System RDBMS ORACLE_HOME Directory [/remote/app/oracle/db/tech_st/11.1.0] : /remote/app/oracle//db/tech_st/11.2.0

Do you want to preserve the Display [linux-tr-64:1] (y/n)  :

Invalid input value. 'y' or 'n' required.


Do you want to preserve the Display [linux-tr-64:1] (y/n)  : n

Target System Display [linux64:0.0] :

Target System Port Pool [0-99] : 35

Checking the port pool 35
done: Port Pool 35 is free
Report file located at /remote/app/oracle//db/tech_st/11.2.0/appsutil/temp/portpool.lst
Complete port information available at /remote/app/oracle//db/tech_st/11.2.0/appsutil/temp/portpool.lst

Creating the new Database Context file from :
  /remote/app/oracle//db/tech_st/11.2.0/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml

Log file located at /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0913163907.log
Check Clone Context logfile /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0913163907.log for details.

Running Rapid Clone with command:
perl /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/adclone.pl java=/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/../jre mode=apply stage=/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml showProgress contextValidated=true
Running:
perl /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/adclone.pl java=/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/../jre mode=apply stage=/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml showProgress contextValidated=true
APPS Password :

Beginning database tier Apply - Sat Sep 13 16:42:10 2014

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

/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/remote/app/oracle//db/tech_st/11.2.0/oui -classpath /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/xmlparserv2.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/ojdbc5.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/java:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/oui/OraInstaller.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/oui/ewt3.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/oui/share.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/oui/srvm.jar:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/jlib/ojmisc.jar   oracle.apps.ad.clone.ApplyDBTier -e /remote/app/oracle//db/tech_st/11.2.0/appsutil/_linux64.xml -stage /remote/app/oracle//db/tech_st/11.2.0/appsutil/clone   -showProgress
APPS Password : Log file located at /remote/app/oracle//db/tech_st/11.2.0/appsutil/log/_linux64/ApplyDBTier_09131642.log
  /     15% completed

Completed Apply...
Sat Sep 13 16:49:10 2014

Starting database listener for :
Running:
/remote/app/oracle//db/tech_st/11.2.0/appsutil/scripts/_linux64/addlnctl.sh start
Logfile: /remote/app/oracle//db/tech_st/11.2.0/appsutil/log/_linux64/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Starting listener process ...


Listener has already been started.


addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /remote/app/oracle//db/tech_st/11.2.0/appsutil/log/_linux64/addlnctl.txt for more information ...

oracle@linux64:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin[10] sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Sat Sep 13 16:49:26 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;

NAME
---------


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@linux64:/remote/app/oracle//db/tech_st/11.2.0/appsutil/clone/bin[11]


2)  Apps Tier configuration on Target system application Server nodes


applmgr@linux64:/remote/app/applmgr//apps/apps_st/comn/clone/bin[152] 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:
/remote/app/applmgr//apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /remote/app/applmgr//apps/apps_st/comn/clone/jlib/java:/remote/app/applmgr//apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/remote/app/applmgr//apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /remote/app/applmgr//apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_23187.lst -stage /remote/app/applmgr//apps/apps_st/comn/clone  2> /tmp/adcfgclone_23187.err; echo $? > /tmp/adcfgclone_23187.res

Log file located at /remote/app/applmgr//apps/apps_st/comn/clone/bin/CloneContext_0913175326.log

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

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

Target System Database SID :

Target System Database Server Node [linux64] :

Target System Database Domain Name [svs.usa.hp.com] :

Target System Base Directory : /remote/app/applmgr

Target System Tools ORACLE_HOME Directory [/remote/app/applmgr/apps/tech_st/10.1.2] : /remote/app/applmgr//apps/tech_st/10.1.2

Target System Web ORACLE_HOME Directory [/remote/app/applmgr/apps/tech_st/10.1.3] : /remote/app/applmgr//apps/tech_st/10.1.3

Target System APPL_TOP Directory [/remote/app/applmgr/apps/apps_st/appl] : /remote/app/applmgr//apps/apps_st/appl

Target System COMMON_TOP Directory [/remote/app/applmgr/apps/apps_st/comn] : /remote/app/applmgr//apps/apps_st/comn

Target System Instance Home Directory [/remote/app/applmgr/inst] : /remote/app/applmgr//inst/apps/TDBNAME_linux64

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 [linux64:0.0] (y/n)  : N

Target System Display [linux64:0.0] :

Target System Port Pool [0-99] : 35

Checking the port pool 35
done: Port Pool 35 is free
Report file located at /remote/app/applmgr//inst/apps/TDBNAME_linux64/apps/_linux64/admin/out/portpool.lst
Complete port information available at /remote/app/applmgr//inst/apps/TDBNAME_linux64/apps/_linux64/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /remote/app/oracle//db/tech_st/11.2.0/appsutil/outbound/_linux64
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 :
  /remote/app/applmgr//apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
  /remote/app/applmgr//inst/apps/TDBNAME_linux64/apps/_linux64/appl/admin/_linux64.xml

Log file located at /remote/app/applmgr//apps/apps_st/comn/clone/bin/CloneContext_0913175326.log
Check Clone Context logfile /remote/app/applmgr//apps/apps_st/comn/clone/bin/CloneContext_0913175326.log for details.

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

Beginning application tier Apply - Sat Sep 13 17:58:52 2014

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




ApplyApplTop Completed Successfully.

# Checking the status of AutoConfig run of ApplyApplTop
# AutoConfig Completed successfully

[root@linux64 bin]#




-x-