Welcome to Oracle Database Administrator Home

24x7 oracle database support and solutions
Oracle DBA Home     Routine Maintenance     PostgreSQL     Unix Commands     CVS     Oracle FAQ     Oracle Concepts     SQLPlus     OEM     ASM     Data Guard     RAC     RMAN     Networking     OAS     Partitioning      
Server Parameter File
Optimizer Statistics
Oracle Expdp
Oracle Database Backup
Oracle Database Tuning
Oracle DBA Scripts
Oracle PLSQL
Oracle Newsletter
Unix Shell Scripts
Perl Scripts
Database Auditing
Oracle Database Patching
Oracle Tools
Changing the sysman passw
Top 20 Monitoring SQL
SOP
Standard Operating Procedures (SOPs)

SOP: Step by Step instruction to apply CPUOct2009 patch in Solaris Env (Oracle 10.2.0.4 database)

 

 

 

 

Opatch Utility:  The OPatch utility is located in the <Path_to_Oracle_Home>/OPatch directory. You can run it with various commands and options. The following command shows the syntax for the OPatch utility:

 

<Path_to_OPatch>/opatch <command> [-options]

 

In the preceding command, the following variables are used:

 

    * command: The OPatch command, described in Table 
    * options: The command-line arguments for the command, which are described in the following sections.

 

OPatch Commands
======================================================================

apply: Installs an interim patch. Refer to "apply Command" for more information.

 

napply: Installs n number of patches (hence napply). Refer to "napply Command" for more information.

 

auto: Applies Oracle Clusterware patches. Refer to "auto Command" for more information.

 

lsinventory: Lists what is currently installed on the system. Refer to "lsinventory Command" for more information.

 

query: Queries a given patch for specific details. Refer to "query Command" for more information.

 

rollback: Removes an interim patch. Refer to "rollback Command" for more information.

 

nrollback: Removes n number of patches (hence nrollback). Refer to "nrollback Command" for more information.

 

version: Prints the current version of the patch tool. Refer to "version Command" for more information.

======================================================================

 

To view additional information for any command, use the following command:

<Path_to_OPatch>/opatch command -help

If using Perl, use the following command: perl opatch.pl command -help

To show the full syntax of the -help option, enter opatch -h to view the following display:

Usage: opatch [ -help ] [ -r[eport] ] [ command ]
 
           command := auto
                      apply
                      lsinventory
                      napply
                      nrollback
                      rollback
                      query
                      version
                      prereq
                      util
 
<global_arguments> := -help       Displays the help message for the command.
                      -report     Print the actions without executing.
 
example:
  'opatch -help'
  'opatch auto -help'
  'opatch apply -help'
  'opatch lsinventory -help'
  'opatch napply -help'
  'opatch nrollback -help'
  'opatch rollback -help'
  'opatch prereq -help'
  'opatch util -help'

apply Command

The apply command applies an interim patch to a specified Oracle home. The ORACLE_HOME environment variable must be set to the Oracle home to be patched. Use following syntax for this command:

<Path_to_OPatch>/opatch apply [-delay (value)] [-force] \
[-invPtrLoc (path)] [-jdk (location)] [-jre (location)] [-local] \
[-minimize_downtime] [-no_bug_superset] [-no_inventory] \
[-oh (Oracle Home location)] \
[-post (options to be passed into post) [-opatch_post_end]]\
[-pre (options to be passed into pre) [-opatch_pre_end]] \
[-retry (value)] [-silent] [-verbose] [-no_relink] \ [-no_sysmod (patch
 location)][-remote_nodes (comma separated node names)][-local_node (node
_name)][patch_location]

Table 7–2 describes the options available for the apply command.

Table 7-2 apply Command Options
Option  Description

delay
 

Specifies how many seconds to wait before attempting to lock the inventory in the case of a previous failure. You can use this option only if you specify the -retry option.

force
 

Removes conflicting patches from the system. If a conflict exists that prevents the patch from being applied, you can use the -force option to apply the patch.

invPtrLoc
 

Specifies the location of the oraInst.loc file. This option is needed when the -invPtrLoc argument was used during installation. Oracle recommends using the default Central Inventory for a platform.

jdk
 

Specifies the location of a particular JDK (jar) to use instead of the default location under the Oracle home directory. You cannot use the -jdk and -jre options together.

jre
 

Specifies the location of a particular JRE (Java) to use instead of the default location under the Oracle home directory. You cannot use the -jdk and -jre options together.

local
 

Specifies that the OPatch utility should patch the local node and update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

You can use this option on Oracle Real Application Clusters environments and non-clustered environments. If an entire cluster is shut down before patching, you can use this argument for non-rolling patches.

local_node
 

Specifies the local node for this cluster to the OPatch utility.

You can use this option on Oracle Real Application Clusters environments.

minimize_downtime
 

Specifies the order of nodes to be patched by the OPatch utility.

This option only applies to Oracle Real Application Clusters environments. You cannot use it with the -local option or a rolling patch.

no_bug_superset
 

Specifies to error out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory.

no_inventory
 

Bypasses the inventory for reading and updates. You cannot use this option with the -local option. This option puts the installation into an unsupported state.

no_sysmod
 

Specifies that the OPatch utility need not update the files in the system. It will only update the inventory.

no_relink
 

This option does not perform any make operation. You can use it during multiple patch applications and to perform the linking step only once. OPatch does not keep track of the make operations it did not perform. You need to make sure to execute OPatch without this option at the end for compilation.

oh
 

Specifies the Oracle home directory to use instead of the default.

opatch_post_end
 

Marks the end of the post option. This option is used with the post option. If this argument is not used, everything after post is passed into post.

opatch_pre_end
 

Marks the end of the pre options. This option is used with the pre option. If you do not use this argument, everything after pre is passed into pre.

post
 

Specifies the parameters to be passed inside the post script besides the standard parameters.

pre
 

Specifies the parameters to be passed inside the pre script besides the standard parameters.

remote_nodes
 

Specifies the list of remote nodes to the OPatch utility.

You can use this option on Oracle Real Application Clusters environments.

report
 

Prints the action to the screen without executing it.

retry
 

Specifies how many times the OPatch utility should try when there is an inventory lock failure.

silent
 

Suppresses user interaction, and defaults any answers to "yes."

verbose
 

Prints output to the screen as well as to the log file.

Note:
If a patch consists of SQL changes, follow the instructions in the patch readme, included with the patch to apply the SQL scripts.
napply Command

This command applies interim patches to several Oracle homes at the same time.

Syntax

Use the following syntax for this command:

opatch napply [patch_location] [-id comma-separated list of patch IDs]                      [-delay <value> ] [ -force ]                      [-invPtrLoc <Path to oraInst.loc> ]                      [-jdk <LOC> ] [-jre <LOC> ] [ -local ]                      [-minimize_downtime ] [-no_bug_superset ]                      [-no_inventory ] [-oh <ORACLE_HOME> ]                      [-retry <value> ] [-silent ]                      [-verbose ]  [-no_relink]                       [-pre <parameters for the pre script in                      escaped double quotes> [-opatch_pre_end] ]                      [-post <parameters for the post script in                      escaped double quotes> [-opatch_post_end] ]                      [-no_sysmod]                      [ -property_file <Path to property file> ]                      [ -local_node <Local node name> ]                      [ -remote_nodes <List of remote nodes (node1,node2)> ]                      [ -all_nodes ]                      [ -phBaseFile <Path to the file containing the                        location of the patches to be applied> ]                      [-skip_subset] [-skip_duplicate] [-report]

Examples

    *

      The following example applies all patches under the <patch_location> directory:

      opatch napply <patch_location>

    *

      The following example applies patches 1, 2, and 3 that are under the <patch_location> directory:

      opatch napply <patch_location> -id 1,2,3

    *

      The following example applies all patches under the <patch_location> directory. OPatch skips duplicate patches and subset patches (patches under <patch_location> that are subsets of patches installed in the Oracle home).

      opatch napply <patch_location> -skip_subset -skip_duplicate

      See the description for the skip_subset option in Table 7–3 for more information.

    *

      The following example applies patches 1, 2, and 3 that are under the <patch_location> directory. OPatch skips duplicate patches and subset patches (patches under <patch_location> that are subsets of patches installed in the Oracle home).

      opatch napply <patch_location> -id 1,2,3 -skip_subset -skip_duplicate

      See the description for the skip_subset option in Table 7–3 for more information.

Options

Table 7–3 lists the options available for this command.

Table 7-3 Napply Command Options
Option  Description

all_nodes
 

Applies the patch using the all-node mode.

delay
 

Specifies how many seconds to wait before attempting to lock the inventory again for a previous failure. You can use this option only if you specify the retry option.

force
 

Removes conflicting patches from the system. If a conflict exists that prevents the patch from being applied, you can use this option to apply the patch. OPatch removes all the conflicting patches before applying the current patch.

invPtrLoc
 

Specifies the location of the oraInst.loc file. The invPtrLoc option is needed when this option is used during installation. Oracle recommends the use of the default Central Inventory for a platform.

jdk
 

Instructs OPatch to use JDK (jar) from the specified location instead of the default location under the Oracle home directory. If you do not specify the jre option, JVM is executed from the jdk location.

jre
 

Instructs OPatch to use JRE (Java) from the specified location instead of the default location under the Oracle home directory. You cannot specify the jdk and jre options together.

local
 

Specifies that OPatch should patch the local node and update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

You can use this option on Oracle Real Application Clusters environments and non-clustered environments. If an entire cluster is shut down before patching, you can use this option for non-rolling patches.

local_node
 

Tells OPatch the local node for this cluster. You can use this option on Oracle Real Application Clusters environments.

minimize_downtime
 

Specifies the order of nodes that OPatch should patch.

This option only applies to Oracle Real Application Clusters environments. You cannot use it with the -local option with a rolling patch.

no_bug_superset
 

Specifies to error out if the current patch's bugs-to-fix is a superset (or same set) of an installed patch's bugs-fixed in the Oracle home directory.

no_inventory
 

Bypasses the inventory for reading and updates. You cannot use this option with the local option. This option places the installation into an unsupported state.

no_relink
 

This option does not perform any make operations. You can use it during multiple patch applications and to perform the linking step only once. OPatch does not keep track of the make operations it did not perform. You need to make sure to execute OPatch without this option at the end for compilation.

no_sysmod
 

Specifies that OPatch does not need to update the files in the system. It only updates the inventory. It also does not execute the pre and post scripts.

oh
 

Specifies the Oracle home directory to use instead of the default. This takes precedence over the environment variable ORACLE_HOME.

opatch_post_end
 

Marks the end of the post option. You use this option with the post option. If you do not use this option, everything after post until the end of the command is passed into post.

opatch_pre_end
 

Marks the end of the pre options. You use this option with the pre option. If you do not use this option, everything after pre until the end of the command is passed into pre.

Patch Location
 

Indicates the path to the patch location. If you do not specify the location, OPatch assumes the current directory is the patch location.

phBaseFile
 

If you do not specify <patch_location>, use this option to point OPatch to a file containing a list of patches to be n-applied. Each line in the file points to a location of a patch.

post
 

Specifies the parameters to be passed to the post script. This script is executed after the patch is applied. You need to enclose the values for this option in double-quotes.

pre
 

Specifies the parameters to be passed to the pre script. This script is executed before the patch is applied. You need to enclose the values for this option in double-quotes.

property_file
 

Specifies the user-defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that OPatch supplies.

remote_nodes
 

Tells OPatch the list of remote nodes. You can use this option on Oracle Real Application Clusters environments. The node names must be separated with commas, but without spaces.

report
 

Prints the action to the screen without executing it.

retry
 

Tells OPatch how many times it should retry when there is an inventory lock failure.

silent
 

Suppresses user interaction, and defaults any answers to "yes."

skip_duplicate
 

Skips patches to be applied that are duplicates of other patches installed in the Oracle home. Two patches are duplicates if they fix the same set of bugs.

skip_subset
 

Skips patches to be applied that are subsets of other patches installed in the Oracle home. One patch is a subset of another patch if the former fixes a subset of bugs fixed by the latter.

For example, if you used napply yesterday for patch A that fixed bugs 1 and 2, then you use napply today with this option for patch B that fixes bug 1 and patch C that fixes bugs 1, 2, and 3, then subset patch A is skipped, and patch C then becomes a superset of patch A.

verbose
 

Prints additional OPatch output to the screen as well as to the log file.

auto Command

Ordinarily, a Clusterware patch requires several manual steps before and after you apply the patch, such as:

    *

      Stopping all dependent databases
    *

      Stopping Clusterware resources
    *

      Running pre-patch scripts
    *

      Shutting down Clusterware
    *

      Running post-patch scripts
    *

      Starting Clusterware and dependent databases

The OPatch auto command automates all of these tasks for patching the CRS home and all other applicable RDBMS homes.

Syntax

Use the following syntax for this command:

<path_to_Opatch>/opatch auto          [-rollback [patch_location]]           [[patch_location]-oh <path_to_oracle_home1>,<path_to_oracle_home2>...] |         [[patch_location]-och <path_to_crs_home>]            

... where patch_location is path to the location for the patch. If you do not specify the patch location, the current directory is considered the patch location.

Options

Table 7–4 lists the options available for this command.

Table 7-4 Auto Command Options
Option  Description

rollback
 

Rolls back the patch rather than applying it.

oh
 

Comma-separated Oracle homes to patch. The default is all applicable Oracle homes. Use this option to patch RDBMS homes where no database is registered.

och
 

Path of the Oracle Clusterware home. Use this option to patch only Oracle Clusterware homes where Oracle Clusterware has been stopped already. Do not use this option for Oracle Clusterware with a CRS stack that is up.

Examples

    *

      The following example applies a patch with an unzipped patch location to all applicable Oracle homes on the system:

      opatch auto <patch_location>

    *

      The following example rolls back the patch from all the applicable Oracle homes on the system:

      opatch auto -rollback <patch_location>

    *

      The following example patches a selective list of Oracle homes:

      opatch auto <patch_location> -oh /tmp/oh1,/tmp/oh2,/tmp/oh3

    *

      The following example only patches the CRS home when the Oracle Clusterware stack is down.

      opatch auto <patch_location> -och /tmp/ora_crs_home

lsinventory Command

The lsinventory command reports what has been installed on the system for a particular Oracle home directory, or for all installations. The following syntax is used for this command:

<Path_to_OPatch>/opatch lsinventory [-all] [-bugs_fixed asc|desc] [-delay (value)] [-detail] [-invPrtLoc (path)] \
[-jre (location)] [-patch asc|desc] [-oh (Oracle Home location)] [-retry (value)]

Table 7–5 describes the options available for the lsinventory command.

Table 7-5 lsinventory Command Options
Option  Description

all
 

Reports the name and installation directory for each Oracle home directory found.

bugs_fixed
 

Reports bugs fixed by installed patches in a tabular format. Besides the bugs fixed, the report also displays the installed patches, installed times, and bug descriptions. The fixed bugs are sorted per installed patch. The default display is patches in descending order based on installed time and ascending order of bugs within each patch. You can use 'asc' or 'desc' with this option to enforce sort order on bugs within each patch.

You can use this option with the patch or patch_id option to obtain sort orders with installed patches.

delay
 

Specifies how many seconds to wait before attempting to lock the inventory in the case of a previous failure. You can use this option only if the -retry option is specified.

detail
 

Reports the installed products and other details. You cannot use this option with the -all option.

invPtrLoc
 

Specifies the location of the oraInst.loc file. This option is needed when the invPtrLoc option was used during installation. Oracle recommends using the default Central Inventory for a platform.

jre
 

Specifies the location of a particular JRE (Java) to use instead of the default location under the Oracle home directory.

oh
 

Specifies the Oracle home directory to use instead of the default directory.

patch
 

Lists the patch IDs installed in the Oracle home in ascending (asc) or descending (desc) order, which is the default, based on installed time.

retry
 

Specifies how many times the OPatch utility should try when there is an inventory lock failure.

-detail Option Example

The following example shows the output of opatch lsinventory -detail:

Oracle interim Patch Installer version 11.2.0.0.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved..
Oracle Home       : /home/oracle_TEST/product/10.2.0/db_1
Central Inventory : /home/OUIHome_Opatch
   from           : /home/oracle_TEST/product/10.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.0.1
OUI version       : 11.2.0.0.1
OUI location      : /home/oracle_TEST/product/10.2.0/db_1/oui
Log file location : /home/oracle_
TEST/product/10.2.0/db1/cfgtoollogs/opatch/opatch-2008_May_25_11-09-34-IST_Wed.log
Patch history file: /scratch/userid/newDB/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /home/oracle_TEST/product/10.2.0/db_
1/cfgtoollogs/opatch/lsinv/lsinventory-2008_May_25_11-09-34-IST_Wed.txt
 --------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 10g                                                  11.2.0.0.1
There are 1 products installed in this Oracle Home.
Installed Products (10):
Agent Required Support Files                                         10.2.0.4.6
Assistant Common Files                                               10.2.0.4.6
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              10.2.0.4.6
Character Set Migration Utility                                      10.2.0.4.6
Database Configuration and Upgrade Assistants                        10.2.0.4.6
Database SQL Scripts                                                 10.2.0.4.6
Database Workspace Manager                                           10.2.0.4.6
DBJAVA Required Support Files                                        10.2.0.4.6
Enterprise Edition Options                                           10.2.0.4.6
There are 10 products installed in this Oracle Home.
Intermin patches (1) :
Patch  111000       : applied on Mon May 23 19:44:08 IST 2008
Created on 27 Jul 2007, 05:43:46 hrs PST8PDT
Bugs fixed: 111000
Files Touched:
/qmtest.o --> ORACLE_HOME/lib/libserver11.a
libmapsym.so --> ORACLE_HOME/lib/libmapsym.so
ins_rdbms.mk --> ORACLE_HOME/rdbms/lib/ioracle
/oracle/xml/jaxb/orajaxb.class --> ORACLE_HOME/lib/xml.jar
Patch Location in Inventory:
/home/oracle_TEST/product/10.2.0/db_1/inventory/oneoffs/111000
Patch Location in Storage area:
/home/oracle_TEST/product/10.2.0/db_1/.patch_storage/111000_Jul_27_2007_05_43_46
 --------------------------------------------------------------------------------
 OPatch succeeded.

-bugs_fixed Option Example

The following example shows the output of opatch lsinventory -bugs_fixed asc:

Oracle interim Patch Installer version 11.2.0.0.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved..
Oracle Home       : /home/oracle_TEST/product/10.2.0/db_1
Central Inventory : /home/OUIHome_Opatch
   from           : /home/oracle_TEST/product/10.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.0.1
OUI version       : 11.2.0.0.1
OUI location      : /home/oracle_TEST/product/10.2.0/db_1/oui
Log file location : /home/oracle_
TEST/product/10.2.0/db1/cfgtoollogs/opatch/opatch-2008_May_25_11-09-34-IST_Wed.log
Patch history file: /scratch/userid/newDB/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /home/oracle_TEST/product/10.2.0/db_
1/cfgtoollogs/opatch/lsinv/lsinventory-2008_May_25_11-09-34-IST_Wed.txt
 --------------------------------------------------------------------------------
Installed Top-level Products (2):
 
Oracle Database 11g                                                  11.2.0.0.1
Oracle Database 11g Release 2 Patch Set 2                            11.2.0.0.1
There are 2 products installed in this Oracle Home.
 
 
List of Bugs fixed by Installed Patches:
 
Bug        Fixed by          Installed at                   Description
           Patch
---        --------          ------------                   -----------
 
1000000    6079591   Mon Oct 13 02:03:42 PDT 2008   test bug
6079591    6079591   Mon Oct 13 02:03:42 PDT 2008   MLR BUG FOR 10.2.0:.3 FOR CPU:JUL2:007
300500     300500    Fri Sep 05 02:25:34 PDT 2008   Demo bug for patching files
300501     300500    Fri Sep 05 02:25:34 PDT 2008   Demo bug for patching files
300502     300500    Fri Sep 05 02:25:34 PDT 2008   Demo bug for patching files
6121268    6121268   Tue Aug 19 23:32:33 PDT 2008   DB-10.2.0.3-MOLECULE-007-CPUJUL2007
6121266    6121266   Tue Aug 19 23:32:27 PDT 2008   DB-10.2.0.3-MOLECULE-018-CPUJUL2007
6121264    6121264   Tue Aug 19 23:32:22 PDT 2008   DB-10.2.0.3-MOLECULE-017-CPUJUL2007
6121263    6121263   Tue Aug 19 23:32:14 PDT 2008   DB-10.2.0.3-MOLECULE-016-CPUJUL2007
.....
.....
(Middle section of report is intentionally excluded.)
.....
.....
6121248    6650096   Tue Feb 12 05:50:48 PST 2008   DB-10.2.0.3-MOLECULE-015-CPUJUL2007
6650096    6650096   Tue Feb 12 05:50:48 PST 2008   DB-10.2.0.3-MOLECULE-036-CPUJAN2008
6121247    6650095   Tue Feb 12 05:50:41 PST 2008   DB-10.2.0.3-MOLECULE-006-CPUAPR2007
6397946    6650095   Tue Feb 12 05:50:41 PST 2008   DB-10.2.0.3-MOLECULE-031-CPUOCT2007
6650095    6650095   Tue Feb 12 05:50:41 PST 2008   DB-10.2.0.3-MOLECULE-035-CPUJAN2008
6650081    6650081   Tue Feb 12 05:50:35 PST 2008   DB-10.2.0.3-MOLECULE-034-CPUJAN2008
6646853    6646853   Tue Feb 12 05:50:28 PST 2008   MLR BUG FOR 10.2.0.3 FOR CPUJAN2008
6452863    6452863   Tue Feb 12 05:50:12 PST 2008   TRACKING BUG FOR CPUJUL2007
 --------------------------------------------------------------------------------
 OPatch succeeded.

-patch desc Option Example

The following example shows the output of opatch lsinventory -patch desc:

Oracle interim Patch Installer version 11.2.0.0.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved..
Oracle Home       : /home/oracle_TEST/product/10.2.0/db_1
Central Inventory : /home/OUIHome_Opatch
   from           : /home/oracle_TEST/product/10.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.0.1
OUI version       : 11.2.0.0.1
OUI location      : /home/oracle_TEST/product/10.2.0/db_1/oui
Log file location : /home/oracle_
TEST/product/10.2.0/db1/cfgtoollogs/opatch/opatch-2008_May_25_11-09-34-IST_Wed.log
Patch history file: /scratch/userid/newDB/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /home/oracle_TEST/product/10.2.0/db_
1/cfgtoollogs/opatch/lsinv/lsinventory-2008_May_25_11-09-34-IST_Wed.txt
 --------------------------------------------------------------------------------
Interim patches (39) :
Patch  6079591      : applied on Mon Oct 13 02:03:42 PDT 2008
   Created on 21 Jun 2007, 03:42:18 hrs PST8PDT
   Bugs fixed:
     6079591, 1000000
 
Patch  300500       : applied on Fri Sep 05 02:25:34 PDT 2008
   Created on 07 Nov 2005, 04:57:14 hrs US/Eastern
   Bugs fixed:
     300500, 300501, 300502
 --------------------------------------------------------------------------------
 OPatch succeeded.

-detail Option Example

The following example shows the output of opatch lsinventory -detail:

Oracle interim Patch Installer version 11.2.0.0.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved..
Oracle Home       : /home/oracle_TEST/product/10.2.0/db_1
Central Inventory : /home/OUIHome_Opatch
   from           : /home/oracle_TEST/product/10.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.0.1
OUI version       : 11.2.0.0.1
OUI location      : /home/oracle_TEST/product/10.2.0/db_1/oui
Log file location : /home/oracle_
TEST/product/10.2.0/db1/cfgtoollogs/opatch/opatch-2008_May_25_11-09-34-IST_Wed.log
Lsinventory Output file location : /home/oracle_TEST/product/10.2.0/db_
1/cfgtoollogs/opatch/lsinv/lsinventory-2008_May_25_11-09-34-IST_Wed.txt
 --------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 10g                                                  11.2.0.0.1
There are 1 products installed in this Oracle Home.
Installed Products (10):
Agent Required Support Files                                         10.2.0.4.6
Assistant Common Files                                               10.2.0.4.6
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              10.2.0.4.6
Character Set Migration Utility                                      10.2.0.4.6
Database Configuration and Upgrade Assistants                        10.2.0.4.6
Database SQL Scripts                                                 10.2.0.4.6
Database Workspace Manager                                           10.2.0.4.6
DBJAVA Required Support Files                                        10.2.0.4.6
Enterprise Edition Options                                           10.2.0.4.6
There are 10 products installed in this Oracle Home.
Intermin patches (1) :
Patch  102000       : applied on Mon May 23 19:44:08 IST 2008
Created on 27 Jul 2007, 05:43:46 hrs PST8PDT
Bugs fixed: 102000
Files Touched:
/qmtest.o --> ORACLE_HOME/lib/libserver10.a
libmapsym.so --> ORACLE_HOME/lib/libmapsym.so
ins_rdbms.mk --> ORACLE_HOME/rdbms/lib/ioracle
/oracle/xml/jaxb/orajaxb.class --> ORACLE_HOME/lib/xml.jar
Patch Location in Inventory:
/home/oracle_TEST/product/10.2.0/db_1/inventory/oneoffs/102000
Patch Location in Storage area:
/home/oracle_TEST/product/10.2.0/db_1/.patch_storage/102000_Jul_27_2007_05_43_46
 --------------------------------------------------------------------------------
 OPatch succeeded.

query Command

The query command queries a specific patch for specific details. It provides information about the patch and the system being patched. The following syntax is used for this command:

<Path_to_OPatch>/opatch query [-all] [-jre (Location)] [-jdk (Location)]\
 [-oh (Location)] [patch_location]

Table 7–6 lists the options available for the query command.

Table 7-6 query Command Options
Option  Description

all
 

Retrieves all information about a patch. This is equivalent to setting all options.

jdk
 

Specifies the location of a particular JDK (jar) to use instead of the default location under the Oracle home directory. You cannot use the -jdk and -jre options together.

jre
 

Specifies the location of a particular JRE (Java) to use instead of the default location under the Oracle home directory. You cannot the use -jdk and -jre options together.

oh
 

Specifies the Oracle home directory to use instead of the default directory.

rollback Command

The rollback command removes a specific interim patch from the appropriate Oracle home directory. The following syntax is used for this command:

<Path_to_OPatch>/opatch rollback -id (patch_id) [-ph (patch directory)] \
[-delay] (value) [-invPtrLoc (path)] [-jdk (location)] [-jre (location)]\
[-local] [-oh (Oracle Home location)] \
[-post (options to be passed into post) [-opatch_post_end]] \
[-pre (options to be passed into pre) [-opatch_pre_end]] [-retry (value)] \
[-silent] [-verbose] [-no_relink] [-no_sysmod][-remote_nodes (node1,node2)][-local_node (node_name)]

Table 7–7 describes the options available for the rollback command.

Table 7-7 rollback Command Options
Option  Description

delay
 

Specifies how many seconds the OPatch utility should wait before attempting to lock the inventory again, if you use the -retry option with the apply command.

id
 

Indicates the patch to be rolled back. Use the -lsinventory command to display all patch identifiers. To successfully roll back a patch, you must supply the patch identifier.

invPtrLoc
 

Specifies the location of the oraInst.loc file. This option is needed when the -invPtrLoc option is used during installation. Oracle recommends using the default Central Inventory for a platform.

jdk
 

Specifies the location of a particular JDK (jar) to use instead of the default location under the Oracle home directory.

jre
 

Specifies the location of a particular JRE (Java) to use instead of the default location under the Oracle home directory.

local
 

Specifies that the OPatch utility should roll back and update the local node and update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

You can use this option on Oracle Real Application Clusters environments and non-clustered environments. If you shut down an entire cluster before patching, you can use this argument for non-rolling patches.

local_node
 

Specifies to the OPatch utility that this is the local node for the cluster.

You can use this option on Oracle Real Application Clusters environments.

no_sysmod
 

Specifies that the OPatch utility need not update the files in the system. It will only update the inventory.

no_relink
 

This option does not perform any make operation in the patch. You can use it during multiple patch removals and to perform the compilation step only once.

oh
 

Specifies the Oracle home directory to use instead of the default directory.

opatch_post_end
 

Marks the end of the post option. This option is used with the post option. If you do not use this argument, everything after post is passed into post.

opatch_pre_end
 

Marks the end of the pre options. This option is used with the pre option. If you do not use this argument, everything after pre is passed into pre.

ph
 

Specifies the valid patch directory area. The utility uses the command types found in the patch directory to identify which commands are used for the current operating system.

post
 

Specifies the parameters to be passed inside the post script besides the standard parameters.

pre
 

Specifies the parameters to be passed inside the pre script besides the standard parameters.

remote_nodes
 

Specifies to the OPatch utility the list of remote nodes.

You can use this option on Oracle Real Application Clusters environments.

report
 

Prints the action to the screen without executing it.

retry
 

Specifies how many times the OPatch utility should try in case of an inventory lock failure.

silent
 

Suppresses user interaction and defaults any answers to "yes". The Oracle Real Application Clusters setup does not support this option.

verbose
 

Prints output to the screen as well as to the log file.

nrollback Command

The nrollback command rolls back interim patches from several Oracle homes at the same time.

Syntax

Use the following syntax for this command:

opatch nrollback -id <comma-separated list of patch IDs>                      [-delay <value>] [-invPtrLoc <Path to oraInst.loc> ]                      [-jdk <LOC> ] [-jre <LOC> ] [-local]                       [-minimize_downtime] [-no_relink] [-oh <ORACLE_HOME> ]                      [-retry <value>]  [-silent]  [-verbose]                      [-pre <parameters for the pre script in                        escaped double quotes> [-opatch_pre_end] ]                      [-post <parameters for the post script in                        escaped double quotes>[ -opatch_post_end] ]                      [-no_sysmod] [-property_file <Path to property file>]                      [-local_node <Local node name>]                      [-remote_nodes <List of remote nodes (node1,node2)>]                      [-all_nodes] [-report]

Example

The following example rolls back patches 1, 2, and 3 that have been installed in the Oracle home:

opatch nrollback -id 1,2,3

Options

Table 7–8 lists the options available for this command.

Table 7-8 Nrollback Options for OUI Patches
Option  Description

all_nodes
 

Rolls back the patch using the all-nodes mode.

delay
 

If you use the retry option with the rollback command, specifies how many seconds OPatch should wait before attempting to lock the inventory again if a previous failure occurs.

id
 

Indicates the patch to be rolled back. Use the lsinventory option to display all patch identifiers. Each one-off patch is indicated by its ID. To successfully roll back a patch, you must provide the patch identifier.

invPtrLoc
 

Specifies the location of the oraInst.loc file. You need to use this option if you used the invPtrLoc option during installation. Oracle recommends the use of the default Central Inventory for a platform.

jdk
 

Instructs OPatch to use JDK (jar) from the specified location instead of the default location under the Oracle home directory. If you do not specify the jre option, JVM is executed from the jdk location.

jre
 

Specifies the location of a particular JRE (Java) for OPatch to use instead of the default location under the Oracle home directory.

local
 

Specifies that OPatch roll back the local node, then update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

You can use this option on Oracle Real Application Clusters environments and non-clustered environments. If an entire cluster is shut down before patching, you can use this option for non-rolling patches.

local_node
 

Specifies to OPatch that this is the local node for the cluster to be used for rollback.

You can use this option for Oracle Real Application Clusters environments.

minimize_downtime
 

Specifies the order of nodes that OPatch should patch.

This option only applies to Oracle Real Application Clusters environments. You cannot use it with the -local option with a rolling patch.

no_sysmod
 

Specifies that OPatch need not update the files in the system, only the inventory. It also does not execute the pre and post scripts.

no_relink
 

This option does not perform any make operation in the patch. You can use this option during multiple patch removals and to perform the compilation step only once.

oh
 

Specifies the Oracle home directory to use instead of the default directory. This takes precedence over the ORACLE_HOME environment variable.

opatch_post_end
 

Marks the end of the post options. Use this option with the post option. If you do not use this option, everything after post until the end of the command is passed into post.

opatch_pre_end
 

Marks the end of the pre options. Use this option with the pre option. If you do not use this option, everything after pre until the end of the command is passed into pre.

Patch Location
 

Indicates the path to the patch location. If you do not specify the location, OPatch assumes the current directory is the patch location.

property_file
 

Specifies the user-defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that OPatch supplies.

remote_nodes
 

Specifies to OPatch the list of remote nodes to be used for rollback of the patch. The node names must be separated with commas, but without spaces.

You can use this option on Oracle Real Application Clusters environments.

report
 

Prints the actions to the screen without executing them.

retry
 

Instructs OPatch how many times it should retry when there is an inventory lock failure.

silent
 

Suppresses user interaction, and defaults any yes|no questions to "yes". A Real Application Clusters setup does not support this option.

verbose
 

Prints additional OPatch output to the screen as well as to the log file.

version Command

The version command shows the current version number of the OPatch utility. The following syntax is used for this command:

<Path_to_OPatch>/opatch version

Patch Set Updates (PSUs) are proactive cumulative patches containing recommended bug fixes that are released on a regular and predictable schedule. PSUs are on the same quarterly schedule as the Critical Patch Updates (CPU), specifically the Tuesday closest to the 15th of January, April, July, and October.

The PSUs serve as a new baseline version for reporting issues to Oracle.