9 Replies Latest reply on Jan 22, 2014 3:30 PM by ChrissiK

    Opatch failed with error code = 1?

    ChrissiK

      I am trying to apply the latest CPU to my servers and am getting the above error.  Details:

       

      Oracle 11.2.0.3 on Windows Server 2008

      Patch ID 17906982 located at E:\Oracle\product\11.2.0\dbhome_2\inventory

      Opatch version 11.2.0.3.5 located at E:\Oracle\product\11.2.0\dbhome_2\OPatch

      ORACLE_HOME set in environmental variables at E:\Oracle\product\11.2.0\dbhome_2

      PATH set in env. variables at %ORACLE_HOME%\Opatch;%PATH%

       

      Even though I have the ORACLE_HOME and PATH set correctly in my environmental variables, I also set them at the command prompt.  Before I proceed I shut down Oracle, all associated services, and MS Distributed Transaction Coordinator.  My code:

       

      C:\>set ORACLE_HOME=E:\Oracle\product\11.2.0\dbhome_2

      C:\> set PATH=%ORACLE_HOME%\Opatch;%PATH%

      C:\> cd/

      C:\ > E:

      E:\> cd Oracle\product\11.2.0\dbhome_2\inventory\17906982

      E:\ >E:\Oracle\product\11.2.0\dbhome_2\OPatch\opatch apply

       

      which returns..

       

      The Oracle Home E:\Oracle\product\11.2.0\dbhome_2  could not be located. Please give proper Oracle Home.

      OPatch returns with error code = 1

       

      OPatch failed with error code = 1

       

      I've Googled this, no luck.  Searched to forums, seems everyone who has encountered error code 1 did not correctly set their ORACLE_HOME.  But unless I'm blinded by tiredness (which is possible) I'm not seeing any errors in my home or path variables.  Any suggestions as to why this might be occurring, or what possible work around there may be would be appreciated.

       

      Namaste

        • 1. Re: Opatch failed with error code = 1?
          DK2010

          Hi,

           

          Have you read the README file for that patch where you can find all the steps for apply that patch, also check the PATH Variable. it would be like

          set PATH=%ORACLE_HOME%\bin;%PATH%  or check in README File for setting the Environment variables.

           

          HTH

          • 2. Re: Opatch failed with error code = 1?
            Hemant Shahi

            Hi,

             

            PATH should be set as :

            PATH=%ORACLE_HOME%\bin

             

            Please check Windows environemnt variable as well, if JRE is installed on your machine , might be PATH is set for java and not for oracle.

            • 3. Re: Opatch failed with error code = 1?
              ChrissiK

              Thanks for the replies.  As I mentioned in my OP, I have checked the Windows Environment Variables and they are set correctly.  I tried doing as you suggested and setting my PATH to %ORACLE_HOME%\bin but that didn't change the results .  Below are the instructions for installing this patch which I have followed.  As you can see, the instructions say to put the directory containing the opatch script in your PATH, so that's why I was setting PATH=%ORACLE_HOME%\Opatch;%PATH%.  This has always worked in the past.  I have read the README file, checked known issues, and checked my log files.  There are no known issues like what I am describing and nothing gets written to the opatch logfile because, I assume, nothing is running.

               

              Anyone else encounter this type of issue?  Thanks for your time.

               

              https://updates.oracle.com/Orion/Services/download?type=readme&aru=17122234#CHDICDDB

              3.3.2 Patch Installation Instructions for Single Instance

              Follow these steps:

              1. Cleanly shut down all processes running from the ORACLE_HOME.
              2. Set the ORACLE_HOME environment variable to the correct Oracle home that needs to be patched.
                > set ORACLE_HOME=<Oracle Home Path> 
              3. Go to the directory where you downloaded the patch:
                > cd 17906982  
              4. Ensure that the directory containing the OPatch script appears in your PATH setting. Enter the following command to run OPatch:
                > opatch apply  
              5. Inspect the opatch<timestamp>.log file generated in %ORACLE_HOME%\cfgtoollogs\opatch for any errors.
              6. If there are errors, refer to Section 4, "Known Issues".
              • 4. Re: Opatch failed with error code = 1?
                sb92075

                DIR /Q/P %ORACLE_HOME%

                 

                post results from OS command above

                • 5. Re: Opatch failed with error code = 1?
                  Gayu0726

                  Please run this command

                   

                  $ORACLE_HOME/OPatch/opatch lsinventory


                  If you get the output succesfully, then the oracle home  and path is set.

                  • 6. Re: Opatch failed with error code = 1?
                    ChrissiK

                    DIR /Q/P %ORACLE_HOME%

                     

                    post results from OS command above

                     

                    --------------------------------------------------------------------------------------------------------------------------------

                    C:\Users\fiona514>DIR /Q/P %ORACLE_HOME%

                    Volume in drive E is APPS

                    Volume Serial Number is 9E29-F10B

                     

                    Directory of E:\Oracle\product\11.2.0\dbhome_2

                     

                    01/16/2014  11:00 PM    <DIR>          BUILTIN\Administrators .

                    01/16/2014  11:00 PM    <DIR>          BUILTIN\Administrators ..

                    10/17/2013  04:50 PM    <DIR>          BUILTIN\Administrators .patch_storage

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators admin

                    02/01/2013  11:43 AM    <DIR>          BUILTIN\Administrators apex

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators ASP.NET

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators assistants

                    02/01/2013  01:34 PM    <DIR>          BUILTIN\Administrators BIN

                    10/17/2013  04:48 PM    <DIR>          BUILTIN\Administrators bundle

                    10/20/2013  12:57 PM    <DIR>          ...                    ccr

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators cdata

                    08/29/2013  12:16 PM    <DIR>          BUILTIN\Administrators cfgtoollogs

                    02/01/2013  11:41 AM    <DIR>          BUILTIN\Administrators clone

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators com

                    02/01/2013  11:47 AM    <DIR>          BUILTIN\Administrators config

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators crs

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators csmig

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators css

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators ctx

                    Press any key to continue . . .

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators cv

                    07/17/2013  03:15 PM    <DIR>          BUILTIN\Administrators database

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators dbs

                    02/01/2013  11:45 AM    <DIR>          BUILTIN\Administrators dc_ocm

                    02/01/2013  11:51 AM    <DIR>          BUILTIN\Administrators deinstall

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators demo

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators diagnostics

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators emcli

                    02/01/2013  11:47 AM    <DIR>          BUILTIN\Administrators EMStage

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators has

                    02/01/2013  11:51 AM    <DIR>          BUILTIN\Administrators hs

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators ide

                    08/30/2013  02:25 PM    <DIR>          BUILTIN\Administrators install

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators instantclient

                    01/16/2014  10:46 PM    <DIR>          BUILTIN\Administrators inventory

                    02/01/2013  11:42 AM    <DIR>          BUILTIN\Administrators j2ee

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators javavm

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators jdbc

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators jdev

                    02/01/2013  11:45 AM    <DIR>          BUILTIN\Administrators jdk

                    10/17/2013  04:49 PM    <DIR>          BUILTIN\Administrators jlib

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators ldap

                    02/01/2013  11:45 AM    <DIR>          BUILTIN\Administrators LIB

                    02/01/2013  12:13 PM    <DIR>          BUILTIN\Administrators log

                    Press any key to continue . . .

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators md

                    02/01/2013  11:35 AM    <DIR>          BUILTIN\Administrators mesg

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators MMC Snap-Ins

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators NETWORK

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators nls

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators oc4j

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators OCI

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators odbc

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators ODE.NET

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators ODP.NET

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators olap

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators oledb

                    08/29/2013  11:05 AM    <DIR>          BUILTIN\Administrators OPatch

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators opmn

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators oraconfig

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators oracore

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators oradata

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators ORAINST

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators oramts

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators ord

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators oui

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators owb

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators owm

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators perl

                    Press any key to continue . . .

                    02/01/2013  11:33 AM    <DIR>          BUILTIN\Administrators plsql

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators precomp

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators racg

                    09/14/2013  12:57 PM    <DIR>          BUILTIN\Administrators rda

                    02/01/2013  11:51 AM    <DIR>          BUILTIN\Administrators RDBMS

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators relnotes

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators scheduler

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators slax

                    02/01/2013  11:44 AM    <DIR>          BUILTIN\Administrators sqldeveloper

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators sqlj

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators sqlplus

                    02/01/2013  11:50 AM    <DIR>          BUILTIN\Administrators srvm

                    02/01/2013  11:47 AM    <DIR>          BUILTIN\Administrators sysman

                    02/01/2013  11:38 AM    <DIR>          BUILTIN\Administrators timingframework

                    02/01/2013  11:46 AM    <DIR>          BUILTIN\Administrators ucp

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators uix

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators usm

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators utl

                    02/01/2013  11:32 AM    <DIR>          BUILTIN\Administrators wwg

                    02/01/2013  11:37 AM    <DIR>          BUILTIN\Administrators xdk

                    01/21/2014  08:14 AM    <DIR>          BUILTIN\Administrators XORAServer.semcogd

                    om.local_semdb

                                   0 File(s)              0 bytes

                                  88 Dir(s)  18,388,320,256 bytes free

                    • 7. Re: Opatch failed with error code = 1?
                      ChrissiK

                      Some progress.  I broke down my path folder by folder until I found where the OS couldn't 'see' the folder/files; it was at the Opatch folder level.  Went into OS properties and 'Shared' that folder with my Admin account, which seemed to fix the original problem.  Now I'm encountering a different one, error code 73.  Code below:

                       

                      E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982>E:\Oracle\product\11.2.0\dbhome_2\OPatch\opatch apply

                      Oracle Interim Patch Installer version 11.2.0.3.5

                      Copyright (c) 2013, Oracle Corporation.  All rights reserved.

                       

                      Oracle Home       : E:\Oracle\product\11.2.0\dbhome_2

                      Central Inventory : C:\Program Files\Oracle\Inventory

                         from           : n/a

                      OPatch version    : 11.2.0.3.5

                      OUI version       : 11.2.0.3.0

                      Log file location : E:\Oracle\product\11.2.0\dbhome_2\cfgtoollogs\opatch\opatch2014-01-21_13-57-00PM_1.log

                       

                      Failed to load the patch object.  Possible causes are:

                       

                      The specified path is not an interim Patch shiphome

                        Meta-data files are missing from the patch area

                        Patch location = E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982

                        Details = PatchObject constructor: Input file "E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982\etc\config\actions" or "E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982\etc\config\inventory" does not exist.

                       

                       

                      OPatch failed: PatchObject constructor: Input file "E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982\etc\config\actions" or "E:\Oracle\product\11.2.0\dbhome_2\inventory\17906982\etc\config\inventory" does not exist.

                       

                      Log file location: E:\Oracle\product\11.2.0\dbhome_2\cfgtoollogs\opatch\opatch2014-01-21_13-57-00PM_1.log

                       

                      OPatch failed with error code = 73

                       

                      ------------------------------------------------------------------------------------------

                      Based on the error message and log files I checked the ..\etc\config\ folder for the actions and inventory files- inventory is there but actions is not.  My interpretation of the error message is that it should be one or the other, not both required, but I could be reading it wrong.  Anyone else encounter Opatch failed with error code 73?

                       

                      Thanks

                      • 9. Re: Opatch failed with error code = 1?
                        ChrissiK

                        I solved the problem by downloading the patch again and unzipping it to a different folder in the inventory directory.  Also had to go into my OS settings for inventory and share the folder out to my Admin account.  I'm guessing a Windows update must have affected the permissions on the folders because this all worked fine last October.  In any case, it's done now and I appreciate the advice.

                         

                        Christina