This is a premium alert message you can set from Layout! Get Now!

About OPatch

Anup
1
OPatch is a java based utility that allow to the DBA to fix or apply interim patches to an Oracle Database. OPatch requires Java(JVM) on the current system.

Difference between adpatch & opatch ?

adpatch is utility to apply oracle apps Patches.
opatch is utility to apply database interim patches.

Difference between interim patches and patchset?

Interim patch apply for any existing bugs in software/database by using opatch utility. Opatch update files in ORACLE_HOME and patchset apple to upgrade existing oracle release patchset by using Oracle Universal Installer. Patchset upgrade database objects. Example: Upgrade database to new version or patchset (10.2.0.3 to 10.2.0.4)


How to check the Opatch version?

Step 1: Set ORACLE_HOME
Step 2: go to /OPatch directory
Step 3: execute:
$ ./opatch version

How to Apply OPatch?

$ORACLE_HOME/OPatch/opatch apply

Location of Opatch Log files?

$ORACLE_HOME/cfgtoollogs/opatch

Can we apply OPatch, if Oracle Inventory has been missed?

No.

How to Apply OPatch if Oracle Inventory has been missed?

Need to re-generate Oracle Inventory.

Why Database Inventory is required at the time of applying OPatch?

Oracle Inventory is the place where all the information about Oracle Home is stored. OPatch require reading this information to apply patches.

Location of Inventory file?

The location of inventory is defined in oraInst.loc file. The path for this file is provided while installing Oracle Home.

If we dont supply any path, the file will be present at central location oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris)

$ cat oraInst.loc

Can we change local inventory location at the time of Installation?

We can create local inventory at any location while installing Oracle Home. We need to use -invPtrLoc variable along with runInstaller command and give the location of oraInst.loc. Otherwise the default path assumed for oraInst.loc is /etc/oraInst.loc.

./runInstaller -invPtrLoc /slot/ems2029/appmgr/apps/tech_st/10.1.2/oraInst.loc

Difference between local and global inventory?

Global inventory is where your all oracle home on that server is registered. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server

Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

How do I find list of oracle product on machine?

check for file inventory.xml under ContentsXML in oraInventory (Please note if you have multiple global Inventory on machine check all oraInventory directories)

How to re-create Global Inventory if corrupted?

We can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option -attachHome

$./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc ORACLE_HOME="Oracle_Home_Location" ORACLE_HOME_NAME="Oracle_Home_Name"
CLUSTER_NODES="{}"

How to Rolling back a patch?

Suppose, if you have applied wrong patch or patch did not fix the issue, we can rollback the patch.

Example:

$ORACLE_HOME/OPatch/opatch rollback –id

How to Applying bundle patches?

Bundle patches having many patches. Bundle patches containing many other patches to Oracle Home. We can apply bundle patches to Oracle Home using a single command.

Example: (if you want to apply all patches)

$ORACLE_HOME/OPatch/opatch until NApply -phBaseDir /export/home/oracle/ -invPtrLoc /export/home/oracle/oraInst.loc

NApply -> Will apply all patches to RDBMS home.

Example: (if you want to apply specify patches)

$ORACLE_HOME/OPatch/opatch until NApply /export/home/oracle/ -id 1,2,3 –skip_subset –skip_duplicate

This will apply patches 1, 2, and 3 which are under < the patch_location> directory. OPatch will skip duplicate patches and subset patches (patches under that are subsets of patches installed in the ORACLE_HOME)

How to know which version is the correct version of Opatch for your RDBMS home?

Read Metalink Note: 357221.1

How to Create Oracle Home Inventory in 10g

cd $ORACLE_HOME/oui/bin
./runInstaller -attachHome ORACLE_HOME=”/export/home/oracle/oracle/db_1/10.2.0″ ORACLE_HOME_NAME=”Oracle10g_home1″
Tags

Post a Comment

1 Comments

Please Select Embedded Mode To show the Comment System.*

Join the conversation(1)
To Top