cancel
Showing results for 
Search instead for 
Did you mean: 

Error while executing OPatch lsinv

Former Member
0 Kudos

Dear All,

We wanted to apply few oracle patches on our XI PRD server so we wanted to check the same on the XI DEV server before we actually apply them on the XI PRD, so we downloaded necssary patches from the SMP for Oracle 10.2.0.2 on Windows.

But when looked at the Oracle version on the XI DEV it was 10.2.0.1 so we had to upgrade it to 10.2.0.2 which was done with the shippment disc given by SAP.

The upgrade went smooth without any errors.

We also followed the steps that were given in the html file in the disc.

After upgrade when i check i dont find any OPatch folder in my Oracle home directory but instead when searched for i found in a folder called inventory\OPatch, but when i execute the

opatch apply C:\<unzipped patch folder>

it says that opatch is not recognised as an internal or external command

then i tried running the opatch lsinventory also

i get the same error.

So i understood that we need to install the opatch utlility to run the opatch commands

I know that the OPATCH utility is built-in with Oracle 10.2 but i dont have any folder related to this that is working fine for me..

Kindly help me

Thanks in advance

Points for sure

Regards

Harry Hunter

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Harry,

Try to start Opatch after login with ora<SID> .

If it does not work then swtch your folder to inventory folder and start Opatch from there.

Reward point if it works.

Regards,

Rohit Mehta

Former Member
0 Kudos

Dear Rohit and Experts,

I have tried and failed to succeed, when i checked @ the SMP for any Opatch i found two versions of the same and extracted it and copied the OPatch folder to the ORACLE_HOME directory and then it worked fine for me.

But when i am trying to apply the interm patch it gives me the following error

OPatch failed with error code = 14

so kindly help me on the same

Thanks in advance

And reward points for sure..

Regards

Harry

former_member185954
Active Contributor
0 Kudos

Hello Harry,

I once wrote a detailed document for patching using Opatch, here are some extracts.


*The OPatch utility requires the following:*

•	The Oracle home environment variable (ORACLE_HOME) must point to a valid Oracle home directory and match the value used during installation of the Oracle home directory.
•	Java SDK 1.4 or higher, Java commands for Windows and ar, cp, fuser, and, make commands for UNIX must be made available.
•	The library path must be set correctly for Oracle Real Application Clusters environments. OPatch uses some APIs to detect if the system is Real Application Clusters. Ensure that the library path is set correctly as follows:

For Solaris
LD_LIBRARY_PATH = $ORACLE_HOME/lib32:$ORACLE_HOME/lib

For HP-UX - 
SHLIB_PATH=$ORACLE_HOME/lib32:/usr/lib

For IBM-AIX
LIBPATH=/usr/lib:/lib:/usr/sap/<SID>/SYS/exe/run:$ORACLE_HOME/lib


*Pre-requisite Checks before invoking Opatch*

Before you invoke OPatch, perform the following pre-requisite checks:

•	Check ORACLE_HOME and Environment Variable - OPatch verifies if the Oracle home is present. You must ensure that the ORACLE_HOME environment variable is set to the Oracle home of the product you are trying to patch. Check the respective vendor documentation for the details to set the environment variable.

•	Check for JRE and JDK - OPatch requires JDK 1.4 or higher to work properly. JRE comes as a part of JDK.

•	Check for System Space - When OPatch processes the script for the installation of a patch, it simultaneously generates a rollback script and saves a copy of every file edited or deleted during the patching. OPatch also backs up the inventory information. So, Oracle recommends that you have sufficient system space to accommodate the patch and the backup information.

•	Check for Oracle Universal Installer and OPatch Version Compatibility - OPatch 10.2 requires Oracle Universal Installer 10.2 or higher to work properly. If the Oracle Universal Installer version is less than what OPatch requires, then OPatch errors out.

•	Check for Patch Applicable on Operating System - OPatch detects if a particular patch is applicable for an operating system. If it is not applicable, it gives out a suitable error message.

•	Check for System Commands - OPatch supports a set of properties that are used for various operations of the software. You can use these properties to control the internal operations of OPatch. By default, OPatch uses standard Java property format to specify the properties. An exhaustive list of the default properties and their values are as follows:

fuser=/sbin:/usr/sbin

ar=/usr/ccs/bin/

make=/usr/bin

You can specify OPatch properties in the following ways:
o	By using the default OPatch properties.
o	By specifying the location of the user-defined properties file.
o	By using the command line. The syntax is as follows:

PROPERTY_NAME=VALUE

Example: fuser=/sbin:/usr/sbin

Hope that helps.

PS: Can you post the detailed error message, simply error code 14 doesn't help much i think.

Regards,

Siddhesh

former_member185954
Active Contributor
0 Kudos

Also,

I looked up the error code, i think the error code is about the syntax you are using.

some patches require you to use a different syntax details are given in the README file that comes alongwith the patch.

ensure you read the README file of the patch itself before starting opatching.

Certain patches like CPU patches require some special option.

PS: Which patch number are you trying to apply ?

Regards,

Siddhesh

Edited by: Siddhesh Ghag on Apr 18, 2008 12:04 PM