Sunday, October 12, 2014

How to resolve “Unable to create Patch Object” error?

How to resolve “Unable to create Patch Object” error?

supposed to patch a 11.2.0.1 database and checking conflicts, I got below error
FTU % opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./12419278
Invoking OPatch 11.1.0.6.0   
Oracle Interim Patch Installer version 11.1.0.6.0 Copyright (c) 2007, Oracle Corporation.  All rights reserved.  
PREREQ session   
Oracle Home       : /u02/app/oracle/product/11.2.0.1/FTU 
Central Inventory : /u01/app/oracle/oraInventory   
from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.0 
OUI version       : 11.2.0.1.0 
OUI location      : /u02/app/oracle/product/11.2.0.1/FTU/oui Log file location : /u02/app/oracle/product/11.2.0.1/FTU/cfgtoollogs/opatch/opatch2011-11-05_01-50-34AM.log  
Invoking prereq “checkconflictagainstohwithdetail” 
The location “./12419278/README.html” is not a directory or a valid patch zip file. 
Prereq “checkConflictAgainstOHWithDetail” not executed 
PrereqSession failed: Unable to create Patch Object. 
Exception occured : Patch ID is null.  
OPatch failed with error code 73
We have two solutions for this problem
SOLUTION # 1
——————-
Move the text files like readme.htmlreadme.txt etc from the patch directory to some other location and try checking conflicts and it will be successful
But the problem is, this is not a permanent solution and just a workaround
SOLUTION # 2
——————–
This is the permanent solution for this problem. Cause for this error is we don’t have latest opatch version. As you can see in the output above my database version is 11.2.0.1, but my opatch version is 11.1.0.6. So, download latest opatch version from My Oracle Support with the help of patch # 6880880 and install it
Steps to install new opatch
1. copy the downloaded zip file for patch # 6880880 to $ORACLE_HOME
2. change location to ORACLE_HOME and rename the old OPatch directory
example : FTU%  cd $ORACLE_HOME
FTU%  mv OPatch OPatch.old
3. unzip the zip file which will create new OPatch directory
4. run below command to check if version is changed
FTU% $ORACLE_HOME/OPatch/opatch version
The above steps are also available in README file of the patch

No comments:

Post a Comment