Showing posts with label 6880880. Show all posts
Showing posts with label 6880880. Show all posts

Wednesday, 4 May 2011

OPatch Friendly

OPatch utility now has just got a little fancier and more user friendly.

Download latest OPatch (Patch 6880880) for the Oracle software release (eg. 10.2, 11.1, 11.2) from My Oracle Support and extract to the appropriate Oracle software directory.

NOTE: The OPatch utility can be applied to Database, Grid Control (OMS and Agent), Grid Infrastructure (ASM and CRS) software home directories.

In the below example the database software release is 11.2 and runs on Linux 64 bit platform, so to update the OPatch utility, the patch file 6880880_112000_Linux-x86-64.zip was downloaded.

Below are just a few examples of what you can now do with the more recent versions of OPatch.

A. To download and install latest OPatch version


1. Verify the version of OPatch currently installed, simply run:

Syntax:
export ORACLE_SID=<ORACLE_SID>; . oraenv
$ORACLE_HOME/OPatch/opatch version
Example:
[oracle@lnx01] export ORACLE_SID=112DB; . oraenv
$ORACLE_HOME/OPatch/opatch version
2. Backup old OPatch utility:
[oracle@lnx01] mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.orig

2. Extract and install latest OPatch to Oracle Home directory:

Syntax:
unzip p6880880_<RELEASE>_<OS_PLATFORM>.zip -d $ORACLE_HOME
Example:
[oracle@lnx01] unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME

4. Re-run step 1 from this section to verify new version of OPatch.

B. List Detailed Information About a Patch Before Applying It


The OPatch utility can be used to verify details of a patch before proceeding to apply to the Oracle Home directory. Such information that can verified but not limited to are:
• Check if patch is a Rolling Patch
• Check if patch is a Patchset Update (PSU)
• Check if patch can be run with “opatch auto” option
• Check OS platform the patch can be applied on
• Actual actions and/or steps that patch contains without applying the patch. This include detailed information of files it touches, copies and relinks.

Syntax:
$ORACLE_HOME/OPatch/opatch query -all |more
Example 1:
[oracle@lnx01] cd /home/oracle/download/patches/12311357
[oracle@lnx01] $ORACLE_HOME/OPatch/opatch query -all |more

C. Looking for a Particular Patch Already Applied based on a Bug or Patch Description


To search for a patch based on search string, OPatch can list a detailed description of each patch applied to the Oracle home directory.
Syntax:
$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed |grep –i "<string>"
This is particularly handy if you want to look for a Patchset Update (PSU) or Daylights Savings Time (DST) patch. 

Example 1: 
[oracle@lnx01] $ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed |grep –i “DATABASE PSU”

Example 2: 
[oracle@lnx01] $ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed |grep –i “DST”

D. Cleanup Patch Storage to Reclaim Space


OPatch can now determine and cleanup files in the patch storage that are no longer required. To do so run the following:

Syntax:
[oracle@lnx01] $ORACLE_HOME/OPatch/opatch util cleanup

Tuesday, 12 April 2011

Opatch Fails with Patch ID is null and Error Code 73

This is an issue, I have come across in the past.  This issue can impact most Oracle software homes when applying patches if the incorrect OPatch version exists.

A. Steps to Reproduce Issue


The following command was executed when applying a patch:
oracle@lnx01:[AGENT]$ cd /u01/app/oracle/software/10170020
oracle@lnx01:[AGENT]$ $ORACLE_HOME/OPatch/opatch apply


B. Error Reported


The following output error was reported below:
Invoking OPatch 10.2.0.4.5
Oracle Interim Patch Installer version 10.2.0.4.5
Copyright (c) 2008, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/agent10g
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oracle/oraInst.loc
OPatch version    : 10.2.0.4.5
OUI version       : 10.2.0.5.0
OUI location      : /u01/app/oracle/agent10g/oui
Log file location : /u01/app/oracle/agent10g/cfgtoollogs/opatch/opatch2011-03-15_07-55-15AM.log
Patch history file: /u01/app/oracle/agent10g/cfgtoollogs/opatch/opatch_history.txt
ApplySession failed: Patch ID is null.
System intact, OPatch will not attempt to restore the system
OPatch failed with error code 73

C. Solution 


1. Downloading patch 6880880 for the version of the software release (ie. 10.2 or 11.1, 11.2 etc…) from My Oracle Support.

The patch will be in the following format:
p6880880_<release>_<os_platform>.zip

For example in 10gR2 (10.2), the OPatch will be:
p6880880_102000_SOLARIS64.zip

2. Verify current OPatch version:
oracle@lnx01:[AGENT]$ $ORACLE_HOME/OPatch/opatch version
3. Backup the old OPatch
oracle@lnx01:[AGENT]$ cd $ORACLE_HOME
oracle@lnx01:[AGENT]$ mv OPatch/ OPatch.orig

4. Update the latest patch
oracle@lnx01:[AGENT]$ cd /u01/app/oracle/software
oracle@lnx01:[AGENT]$ unzip -d $ORACLE_HOME p6880880_102000_SOLARIS64.zip

5. Verify OPatch version:
oracle@lnx01:[AGENT]$ $ORACLE_HOME/OPatch/opatch version

6. And then re-apply patch.