G Viewing Release Numbers and Applying Patches

This appendix describes how to view Oracle Fusion Middleware release numbers and how to use the opatch command line to apply patches to Oracle Fusion Middleware.

This appendix contains the following topics:

G.1 Release Number Format

To understand the release level nomenclature used by Oracle, examine the example of an Oracle Fusion Middleware release number shown in Figure G-1.

Figure G-1 Example of an Oracle Fusion Middleware Release Number

Example of an Oracle Release Number
Description of "Figure G-1 Example of an Oracle Fusion Middleware Release Number"

In Figure G-1, each digit is labeled:

  • Major Oracle platform number

    This is the most general identifier. It represents a major new edition (or version) of an application, such as Oracle database server or Oracle Fusion Middleware, and indicates that the release contains significant new functionality.

  • Database maintenance release number

    This digit represents a maintenance release level. Some new features may also be included.

  • Oracle Fusion Middleware release number

    This digit reflects the release level of Oracle Fusion Middleware.

  • Component-specific release number

    This digit identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases.

  • Platform-specific release number

    This digit identifies a platform-specific release.

G.2 Viewing the Software Inventory and Release Numbers

The following sections describe how to obtain the release numbers of Oracle Fusion Middleware:

G.2.1 Viewing Oracle Fusion Middleware Installation Release Numbers

All Oracle Fusion Middleware installations have a release number. This number is updated when you apply a patch set release or upgrade the installation.

You can view the release number of an Oracle Fusion Middleware installation using Oracle Universal Installer, as follows:

  1. Launch Oracle Universal Installer:

    (UNIX) ORACLE_HOME/oui/bin/runInstaller.sh
    (Windows) ORACLE_HOME\oui\bin\setup.exe
    
  2. Click Installed Products to open the Inventory Page.

  3. In the Inventory Page, expand Oracle Homes. You will see entries for all installations on your host.

  4. Expand the Oracle home entry for the installation you are interested in.

  5. You will see an entry with the release number for your original installation, followed by entries for any patch sets that have been applied.

G.2.2 Viewing Component Release Numbers

All Oracle Fusion Middleware components have a release number and many contain services that have release numbers. These numbers may be updated when you apply a patch set release or upgrade the installation.

You can view the release number of components and their services in the following ways:

On the File System

You can view component release numbers as follows on UNIX:

cd ORACLE_HOME/inventory
ls -d Components*/*/*

Using Oracle Universal Installer

If you installed Oracle Fusion Middleware using Oracle Universal Installer, you can view component release numbers as follows:

  1. Launch Oracle Universal Installer:

    (UNIX) ORACLE_HOME/oui/bin/runInstaller.sh
    (Windows) ORACLE_HOME\oui\bin\setup.exe
    
  2. Click Installed Products to open the Inventory Page.

  3. In the Inventory Page, expand Oracle Homes. You will see entries for all installations on your host.

  4. Expand the Oracle home entry for the installation you are interested in.

  5. You will see an entry with the release number for your original installation, followed by entries for any patch sets that have been applied.

  6. Expand the initial entry to view the component release numbers at installation time. If you have subsequent patch set entries, expand them to see the component release numbers updated for each patch set.

G.2.3 Viewing Oracle Internet Directory Release Numbers

Oracle Internet Directory has a server release number, which is the version of the binaries. It also has schema and context versions. All of these numbers correspond to the Oracle Fusion Middleware installation release number through the third digit. These numbers may be updated when you apply a patch set release or upgrade the installation.

Viewing the Oracle Internet Directory Server Release Number

The Oracle Internet Directory server release number is the version of the binaries. You can view the Oracle Internet Directory server release number as follows:

  1. Make sure the ORACLE_HOME environment variable is set.

  2. Run the following command:

    (UNIX) ORACLE_HOME/bin/oidldapd -version
    (Windows) ORACLE_HOME\bin\oidldapd -version
    

Viewing the Oracle Internet Directory Schema and Context Versions

You can view the Oracle Internet Directory schema and context versions in this file:

(UNIX) ORACLE_HOME/ldap/schema/versions.txt
(Windows) ORACLE_HOME\ldap\schema\versions.txt

The contents of this file are kept up-to-date, however, you can also query the schema and context release from Oracle Internet Directory, just to be sure.

To view the schema version:

  1. Make sure the ORACLE_HOME environment variable is set.

  2. Run the following command:

    ldapsearch -h oid_host -p oid_port -D "cn=orcladmin" 
     -q -b "cn=base,cn=oracleschemaversion" 
     -s base "objectclass=*" orclproductversion
    

    Because you use the -q option, the command prompts you for your password.

    The output will be in this form:

    cn=BASE,cn=OracleSchemaVersion
    orclproductversion=90500
    

To view the context version:

  1. Make sure the ORACLE_HOME environment variable is set.

  2. Run the following command:

    ldapsearch -h oid_host -p oid_port -D "cn=orcladmin"
     -q -b "cn=oraclecontext" -s base "objectclass=*" orclversion
    

    Because you use the -q option, the command prompts you for your password.

    The output will be in this form:

    cn=oraclecontext
    orclversion=101200
    

G.2.4 Viewing Metadata Repository Release Numbers

The Metadata Repository is an Oracle Database database that has a release number. This number is updated when you apply a patch set release or upgrade the database.

You can view the Metadata Repository release number using SQL*Plus as follows (you can be connected to the database as any user to issue these commands):

SQL> COL PRODUCT FORMAT A40
SQL> COL VERSION FORMAT A15
SQL> COL STATUS FORMAT A15
SQL> SELECT * FROM PRODUCT_COMPONENT_VERSION;

PRODUCT                                    VERSION         STATUS
----------------------------------         --------------  ----------------
NLSRTL                                     10.1.4.0.2      Production
Oracle Database 10g Enterprise Edition     10.1.4.0.2      64bi
PL/SQL                                     10.1.4.0.2      Production
TNS for Solaris:                           10.1.4.0.2      Production

G.3 Applying Patches

To apply patches, you use the following tools:

  • OPatch, a utility that allows the application and rollback of interim patches to most Oracle products, such as Oracle Fusion Middleware. For the latest information about the opatch utility, and to check for updates, refer to Oracle MetaLink at

    http://www.oracle.com/support/metalink/index.html
    
  • SmartUpdate, a standalone Java application that you can run independently of any software to upgrade Oracle WebLogic Server installations quickly and easily with maintenance patches and maintenance packs. When you install a product for the first time, Smart Update is automatically installed when you install Oracle WebLogic Server.

    For more information about using Smart Update and the products that Smart Update supports, see Oracle Smart Update Installing Patches and Maintenance Packs.

Note the following points about patching the MDS repository:

  • An MDS repository must be registered with a domain before it is patched. Otherwise, the applied patches cannot be rolled back and no additional patches can be applied.

  • You can apply patches to the following:

    • The MDS metadata

    • An MDS jar file

    • An MDS shared library

    • An MDS schema in the database-based metadata repository. The patch can include additive changes such as adding a new column or increasing the size of a column. Note that you cannot rollback this type of patch.

    • The MDS database PL/SQL in the database-based metadata repository. The patch can include changes to a PL/SQL package or new PL/SQL packages and procedures.

    • An MDS schema or PL/SQL in the database-based metadata repository that requires a corresponding MDS JAR file patch.

The following sections describe how to use OPatch:

G.3.1 OPatch Requirements

The OPatch utility has the following requirements:

  • Perl environment, included with Oracle Fusion Middleware or downloaded with a patch set.

  • 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.

  • If the -invPtrLoc command-line argument was used during installation, then it must be used when using the OPatch utility. Oracle recommends the use of the default central inventory for a platform.

  • The jar, java, ar, cp, and make commands must be available in the PATH statement. The commands are not available for all platforms.

  • The library path must be set correctly for Oracle Real Application Clusters environments. Refer to the FAQ document in the opatch/doc directory for additional information.

See Also:

For the latest information about the OPatch utility, and to check for updates, refer to OracleMetaLink at
http://www.oracle.com/support/metalink/index.html

G.3.2 Running the OPatch Utility

The OPatch utility is located in the ORACLE_HOME/OPatch directory. The following shows the syntax for the OPatch utility:

path_to_opatch/opatch option -command_line_arguments

In the preceding example:

  • option—the OPatch option. Values are described in Table G-1.

  • command_line_arguments—the command-line arguments for each option. Values are described in the following sections.

Table G-1 Options for the OPatch Utility

Option Description

apply

Installs an interim patch. See Section G.3.2.1.

lsinventory

Lists what is currently installed on the system. See Section G.3.2.2.

query

Queries a given patch for specific details. See Section G.3.2.3.

rollback

Removes an interim patch. See Section G.3.2.4.

version

Prints the current version of the patch tool. See Section G.3.2.5.


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

path_to_OPatch/opatch option -help

If using Perl, then use the following command:

perl opatch.pl option -help

G.3.2.1 apply Option

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

path_to_opatch/opatch apply patch_location [-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] 

The following table lists the command-line arguments for the apply option:

Argument Description
delay Specifies how many seconds to wait before attempting to lock the inventory in the case of a previous failure.
force Removes conflicting patches from the system. If a conflict exists which prevents the patch from being applied, then the -force argument can be used to apply the patch.
invPtrLoc Specifies the location of the oraInst.loc file. This argument is needed when the -invPtrLoc argument was used during installation. Oracle recommends the use of 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 patch the local node and update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

This argument can be used on Oracle Real Application Clusters environments and non-clustered environments. If an entire cluster is shutdown before patching, then this argument can be used for non-rolling patches.

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

This argument only applies to Oracle Real Application Clusters environments. It cannot be used with the -local argument or a rolling patch.

no_bug_superset Specifies that the utility return an error 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. This argument cannot be used with the -local argument. This argument puts the installation into an unsupported state.
oh Specifies the Oracle home directory to use instead of the default.
opatch_post_end Marks the end of the post options. This argument is used with the post argument. If this argument is not used, then everything after post is passed into post.
opatch_pre_end Marks the end of the pre options. This argument is used with the pre argument. If this argument is not used, then 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.
retry Specifies how many times the OPatch utility should try when there is an inventory lock failure.
patch_location Specifies the directory of the interim patch. This should be a directory with the same name as the patch.
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, then they are only staged. Follow the instructions included with the patch to apply the patch manually on the affected instances. For some products, the SQL application may be implemented as a post-staging action by the tool. These patches cannot be rolled back.

G.3.2.2 lsinventory Option

The lsinventory option 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 option:

path_to_opatch/opatch lsinventory [-all] [-detail] [-invPrtLoc path] \
[-jre location] [-oh ORACLE_HOME_location]

The following table lists the command-line arguments for the lsinventory option:

Argument Description
all Reports the name and installation directory for each found Oracle home directory.
detail Reports the installed products and other details. This argument cannot be used with the -all argument.
invPtrLoc Specifies the location of the oraInst.loc file. This argument is needed when the invPtrLoc command-line argument was used during installation. Oracle recommends the use of 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.

The following is a sample output of opatch lsinventory -detail:

ORACLE_HOME      LOCATION
-----------      --------
Home1            /private/phi_local/OraHome1
   There is no Interim Patch
Home2            /private/phi_local/OraHome2
   There is no Interim Patch
Home3           /private/phi_local/OraHome6
   Installed Patch List:
    =====================
    1) Patch 20 applied on Mon Jul 11 15:53:51 PDT 2006
       [ Base Bug(s): 21  ]
    2) Patch 80 applied on Fri Jul 01 16:15:52 PDT 2006
       [ Base Bug(s): 80 81  ]

G.3.2.3 query Option

The query option 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 option:

path_to_opatch/opatch query [-all] [-get_base_bug] [-get_component] \
[-invPtrLoc path] [-get_date] [-get_os] [-get_system_change] [-is_rolling] \

The following table lists the command-line arguments for the query option:

Argument Description
all Retrieves all information about a patch. This is equivalent to setting all command-line arguments.
get_base_bug Describes the base bugs fixed by a patch.
get_component Describes the Oracle components, optional or required, for a patch.
get_date Provides the build date of a patch.
get_os Provides the operating system description supported by a patch.
get_system_change Describes the changes that will be made to the system by a patch. This argument is not available.
invPtrLoc Specifies the location of the oraInst.loc file. This argument is needed when the invPtrLoc command-line argument was used during installation. Oracle recommends the use of the default central inventory for a platform.
is_rolling Specifies if the patch is a rolling patch for Oracle Real Application Clusters. The set of patches need not be applied to the whole cluster at the same time. The patches can be applied to a select set of nodes at a time.

G.3.2.4 rollback Option

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

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] 

The following table lists the command-line arguments for the rollback option:

Argument Description
delay Specifies how many seconds the OPatch utility should wait before attempting to lock inventory again, if the -retry argument is used with the apply option.
id Indicates the patch to be rolled back. Use the -lsinventory option to display all patch identifiers. To successfully rollback a patch, the patch identifier must be supplied.
invPtrLoc Specifies the location of the oraInst.loc file. This argument is needed when the -invPtrLoc command-line argument was used during installation. Oracle recommends the use of 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 patch the local node and update the inventory of the local node. It does not propagate the patch or inventory update to other nodes.

This argument can be used on Oracle Real Application Clusters environments and non-clustered environments. If an entire cluster is shutdown before patching, then this argument can be used for non-rolling patches.

oh Specifies the Oracle home directory to use instead of the default directory.
opatch_post_end Marks the end of the post options. This argument is used with the post argument. If this argument is not used, then everything after post is passed into post.
opatch_pre_end Marks the end of the pre options. This argument is used with the pre argument. If this argument is not used, then everything after pre is passed into pre.
ph Specifies the valid patch directory area. The utility will use 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.
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."
verbose Prints output to the screen as well as to the log file.

G.3.2.5 version Option

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

path_to_opatch/opatch version