This appendix provides a summary of the syntax and command options to use for the opatch
command. Use these command options to develop your own patch plan.
The OPatch utility is located in the $Oracle_Home/OPatch
directory. You can run it with various commands and options. The following string shows the syntax for the OPatch utility:
<Path_to_OPatch>/opatch [-help] [-r[eport]][command] [-option]
where:
[-help]
displays the help message for the opatch
command.
[-report]
prints the actions without executing.
[command]
is one of the OPatch commands described in Table A-1.
[-option]
is one of the OPatch command options. See each command listed below for a summary of available options.
Command | Description |
---|---|
Installs or applies a patch. |
|
Compare two files generated by the |
|
Lists what is currently installed on the system. |
|
Prints a summary of all installed patches. |
|
Installs n number of patches. |
|
Rolls back patches from several product (e.g., Fusion Middleware) homes at the same time. |
|
Queries a given patch for specific details. |
|
Removes a patch. |
|
Prints the current version of the patch tool. |
|
Runs patching prerequisite checks on an ORACLE_HOME.. |
|
Invokes specified utilities on an GI/RAC home |
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 ] [ -report ] [ command ] command := apply compare lsinventory lspatches 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 -help -fmw' 'opatch apply -help' 'opatch compare -help' 'opatch lsinventory -help' 'opatch lspatches -help' 'opatch napply -help' 'opatch nrollback -help' 'opatch rollback -help' 'opatch prereq -help' 'opatch util -help'
apply
The apply
command applies an interim patch to an ORACLE_HOME from the current directory. The patch location can specified using the parameter patch_location. This command does not support System Patch.
Use following syntax for this command:
opatch apply [-connectString <List of connect strings>] [-delay <value> ] [ -force ] [ -force_conflict ] [-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-local ] [-local_node <Local node name>] [-minimize_downtime ] [-no_bug_superset ] [-no_inventory ] [-no_relink] [-no_sysmod] [-ocmrf <Response file location> ] [-oh <ORACLE_HOME> ] [-post <parameters for the post script in escaped quotes> [-opatch_post_end] ] [-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ] [-profile_mask <Name of profile>] [-property_file <Path to property file>] [-ptlConnect <portal connect string>] [-ptlPassword <portal password>] [-ptlSchema <portal schema>] [-remote_nodes <List of remote nodes (node1,node2)>] [-retry <value ] [-runSql ] [silent ] [-sqlScript <path of the sql file>] [-verbose ] [ <Patch Location> ]
Table A-2 describes the options available for the apply
command.
Table A-2 apply
Command Options
Option | Description |
---|---|
|
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 |
|
If a conflict exist which prevents the patch from being applied, the -force flag can be used to apply the patch. OPatch will remove all the conflicting patches before applying the current patch. In case of conflict among the patches to be applied, the non-conflicting patches will be applied. |
force_conflict |
If a conflict exists which prevents the patch from being applied, the -force_conflict flag can be used to apply the patch. OPatch will remove all the conflicting patches before applying the current patch. This will override the 'silent' behavior for conflicts and hence is meaningful only when used with the 'silent' option. |
|
Specifies the location of the |
|
Instructs OPatch to use JRE (Java) from the specified location instead of the default location under the GI/RAC home directory. |
|
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. |
|
Tells OPatch the local node for this cluster. You can use this option on Oracle Real Application Clusters environments. |
|
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 |
|
Specifies to error out if the current patch bugs-to-fix is a superset (or same set) as an installed patch bugs-fixed in the GI/RAC home directory. |
|
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. |
ocmrf |
Give OPatch the absolute path to the OCM response file to be used for OCM configuration. -silent must be used in conjunction with -ocmrf if GI/RAC home doesn't have OCM installed and configured. |
|
Specifies the GI/RAC home directory to use instead of the default. This takes precedence over the environment variable |
|
Marks the end of the |
|
Marks the end of the |
|
Specifies the parameters to be passed to the |
|
Specifies the parameters to be passed to the |
|
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. |
|
Prints the action to the screen without executing it. |
|
Tells OPatch how many times it should retry when there is an inventory lock failure. |
|
Suppresses user interaction, and defaults any answers to "yes." |
|
Prints additional OPatch 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, which is included with the patch to apply the SQL scripts.compare
The compare
command allows you to compare the bugs that have been fixed between two product (e.g., Fusion Middleware) homes.This command allows for comparison between two files generated by the opatch lsinventory -xml
command. Currently, this command only accepts two files as input.
opatch compare [<file1> <file2>]
lsinventory
The lsinventory
command lists the inventory for a particular GI/RAC home, or displays all installations that can be found. This command does not have any required options.
Use the following syntax for this command:
opatch lsinventory [-all ] [-all_nodes] [-bugs_fixed <asc | desc> ] [-delay <value> ] [-detail ] [-group_by_date ] [-inactive] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-local ] [-oh <ORACLE_HOME> ] [-patch <asc | desc> ] [-patch_id <asc | desc> ] [-ptlConnect <portal connect string> ] [-ptlPassword <portal password> ] [-ptlSchema <portal schema> ] [-property_file <path to property file>] [-retry <value> ] [-translation_patch ] [-xml <xmlFile>]
The following sections provide examples for the detail, bugs_fixed, and patch desc options. See Table A-3 for descriptions of the command options.
Table A-3 describes the options available for the lsinventory
command.
Table A-3 lsinventory
Command Options
Option | Description |
---|---|
all |
Reports the name and installation directory for each GI/RAC 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. 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 option to obtain sort orders with installed patches. |
delay |
If you specify retry, this option tells OPatch how many seconds it should wait before attempting to lock the inventory again in case of a previous failure. |
detail |
Reports the installed products and other details. You cannot use this option with the |
group_by_date |
Specifies that OPatch should group all installed patches by the date they were installed in the GI/RAC home. |
invPtrLoc |
Specifies the location of the |
jre |
Specifies the location of a particular JRE (Java) to use instead of the default location under the GI/RAC home directory. |
local |
Instructs OPatch to display inventory information of the local node only. |
oh |
Specifies the GI/RAC home directory to use instead of the default directory. This takes precedence over the ORACLE_HOME environment variable. |
patch |
Lists the patch IDs installed in the GI/RAC home in ascending (asc) or descending (desc) order, which is the default, based on installed time. |
patch_id |
Lists the patch IDs installed in the GI/RAC home in ascending (asc) or descending (desc) order based on patch numbers. The value defaults to ascending (asc). |
property_file |
Indicates the user-defined property file that OPatch should use. The path to the property should be absolute. This property file takes precedence over the property file that OPatch supplies. |
retry |
Specifies how many times OPatch should retry when there is an inventory lock failure. |
xml |
Generates xml output based on the current GI/RAC home inventory to the specified xml file. |
lspatches
The lspatches
command prints a summary of all installed patches.
Use the following syntax for the lspatches
command:
opatch lspatches [-bugs] [-id <patch ID> ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-oh <ORACLE_HOME> ] [-qfile <file path> ] [-required ] [-verify] <PATCH_ID or PATCH_LOCATION>
Table A-4 lists the options available for the lspatches
command.
Table A-4 lspatches
Command Options
Option | Description |
---|---|
|
Prints out bugs in addition to the summary |
|
This option specifies the patch number. It must be registered in the GI/RAC home inventory. It can be any numeric sequence or combined with language. Example: 11111, 11111/zh_CN. It cannot support multiple patch IDs. |
|
Used to locate the oraInst.loc file. When the installation uses the invPtrLoc flag, the value should indicate the path to oraInst.loc file |
jre |
This option tells OPatch to use JRE (java) from the specified location instead of the default location under GI/RAC home. |
oh |
The GI/RAC home to work on. This takes precedence over the environment variable ORACLE_HOME. |
qfile |
Specifies the relative path to GI/RAC home of the file to determine the latest patch that touches this file. Example: On Linux: admin/rdbms/catcpu.sql On Windows: admin\rdbms\catcpu.sql OPatch can tell which latest patch touches the file catcpu.sql in the GI/RAC home. |
required |
This option will print key metadata only. This includes the following metadata: required components, prereq patches, executables to shutdown and support platforms. This option should be accompanied by either option -id <PATCH_ID> or <PATCH_LOCATION>. |
verify |
This option verifies whether or not the specified patch ID or patch location is registered in the GI/RAC home inventory. In addition, this option validates all patch files in the GI/RAC home. This option should be accompanied by either option -id <PATCH_ID> or <PATCH_LOCATION>.This option doesn't support System Patch. Example:
|
napply
This command applies patches to several product (e.g., Fusion Middleware) homes at the same time. This command does not support System Patches.
Use the following syntax for the napply
command:
opatch napply [patch_location] [-id comma-separated list of patch IDs] [ -all_nodes ] [-connectString <List of connect strings>] [-delay <value> ] [ -force ] [ -force_conflict ] [-idFile <path of the file that has list of patch IDs ] [-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [ -local ] [ -local_node <Local node name> ] [-minimize_downtime ] [-no_bug_superset ] [-no_inventory ] [-no_relink] [-no_sysmod] [-ocmrf <Response file location> ] [-oh <ORACLE_HOME> ] [ -phBaseDir <Path to the directory that contains list of patch directories> ] [ -phBaseFile <Path to the file containing the location of the patches to be applied> ] [-post <parameters for the post script in escaped double quotes> [-opatch_post_end] ] [-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ] [-profile_mask <Name of profile>] [ -property_file <Path to property file> ] [-ptlConnect <portal connect string>] [-ptlPassword <portal password>] [-ptlSchema <portal schema>] [ -remote_nodes <List of remote nodes (node1,node2)> ] [-retry <value> ] [-runSql] [-silent ] [-skip_subset] [-skip_duplicate] [-sqlScript <path of the sql file>] [-verbose ]
Table A-5 lists the options available for this command.
Table A-5 napply
Command Options
Option | Description |
---|---|
|
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 |
|
If a conflict exist which prevents the patch from being applied, the -force flag can be used to apply the patch. OPatch will remove all the conflicting patches before applying the current patch. In case of conflict among the patches to be applied, the non-conflicting patches will be applied. |
|
If a conflict exist which prevents the patch from being applied, the -force_conflict flag can be used to apply the patch. OPatch will remove all the conflicting patches before applying the current patch. This will override the 'silent' behavior for conflicts and hence is meaningful only when used with 'silent' option. |
|
Use the 'lsinventory' option to display all patch ids. Each one-off patch is indicated by its id. A comma separated list of patches can be given to select the patches to be applied. For translation patches, the patch id should be of the format <Patch ID>/<Language code>. |
|
The input to be given is a file location that contains a list of apply patch ids separated by commas or white spaces. This option cannot to be in conjunction with 'id' option. For translation patches, the patch id should be of the format <Patch ID>/<Language code>. |
|
Specifies the location of the |
|
Instructs OPatch to use JRE (Java) from the specified location instead of the default location under the GI/RAC home directory. You cannot specify the |
|
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. |
|
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 GI/RAC home directory. |
|
This option does not perform any |
ocmrf |
Give OPatch the absolute path to the OCM response file to be used for OCM configuration. -silent must be used in conjunction with -ocmrf if GI/RAC home does not have OCM installed and configured. |
|
Specifies the GI/RAC home directory to use instead of the default. This takes precedence over the environment variable |
|
Marks the end of the |
|
Marks the end of the |
phBaseDir |
Used to specify a directory containing patch directories (or) zip files. |
|
If you do not specify |
|
Specifies the parameters to be passed to the |
|
Specifies the parameters to be passed to the |
profile_mask |
If the patch to be applied specifies WLS patch/patchset as prerequisites, OPatch will read the WLS default patch profile. To have OPatch read non-default patch profile, specify the patch profile name with this option. |
|
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. |
|
Prints the action to the screen without executing it. |
|
Tells OPatch how many times it should retry when there is an inventory lock failure. |
|
Suppresses user interaction, and defaults any answers to "yes." |
|
Skips patches to be applied that are duplicates of other patches installed in the GI/RAC home. Two patches are duplicates if they fix the same set of bugs. |
|
Skips patches to be applied that are subsets of other patches installed in the GI/RAC 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 |
|
Prints additional OPatch output to the screen as well as to the log file. |
'opatch napply <patch_location>' to apply all patches under <patch_location> directory 'opatch napply <patch_location> -id 1,2,3' to apply patches 1, 2, and 3 which are present under <patch_location> directory 'opatch napply <patch_location> -skip_subset -skip_duplicate' to apply all patches under <patch_location> directory. OPatch will skip 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' to apply patches 1, 2, and 3 which are under <patch_location> directory. OPatch will skip duplicate patches and subset patches (patches under <patch_location> that are subsets of patches installed in the Oracle Home) 'opatch napply <patch_location> -idfile /tmp/list.txt' where list.txt contains a list of patch IDs to be applied. The list should be separated by a space or comma. For example: 1 2 3 'opatch napply <patch_location> -id 1/fr,2/de' to apply patches 1 (french patch), 1 (german patch) which are present in the <patch_location> directory
nrollback
The Nrollback
command rolls back patches from several product (e.g., Fusion Middleware) homes at the same time.
Use the following syntax for this command:
opatch nrollback -id <comma-separated list of patch IDs> [ -all_nodes ] [-connectString <List of connect strings>] [-delay <value>] -id <Comma separated list of patch IDs> [-idFile <file location containing a list of rollback IDs separated by commas or white spaces> [-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-local] [-local_node <Local node name>] [-no_inventory] [-no_relink] [-no_sysmod] [-oh <ORACLE_HOME> ] [-post <parameters for the post script in escaped double quotes>[ -opatch_post_end] ] [-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ] [-property_file <Path to property file>] [-ptlConnect <portal connect string>] [-ptlPassword <portal password>] [-ptlSchema <portal schema>] [-remote_nodes <List of remote nodes (node1,node2)>] [-retry <value>] [-runSql] [-silent] [-sqlScript <path of the sql file>] [-verbose]
Table A-6 lists the options available for this command.
Table A-6 nrollback Command Options
Option | Description |
---|---|
|
If you use the |
|
Indicates the patch to be rolled back. Use the |
idFile |
Use 'lsinventory' option to display all patch ids. Each one-off patch is indicated by its id. To rollback a patch, the id for that patch must be supplied. The input to be given is a file location that contains a list of rollback patch ids separated by commas or white spaces. For translation patches, the patch id should be of the format <Patch ID>/<Language code>. This option cannot to be in conjunction with 'id' option. |
|
Specifies the location of the |
|
Specifies the location of a particular JRE (Java) for OPatch to use instead of the default location under the GI/RAC home directory. |
|
Specifies that OPatch roll back the local node, then updates 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. |
|
This option does not perform any |
|
Specifies the GI/RAC home directory to use instead of the default directory. This takes precedence over the |
|
Marks the end of the |
|
Marks the end of the |
post |
This option is used to pass parameters to the post script. This script is executed after removal of the patch. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to post scripts of all patches being rolled back. This option should be ended by option 'opatch_post_end'. |
pre |
This option is used to pass parameters to the pre script. This script is executed before removal of the patch. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to pre scripts of all patches being rolled back. This option should be ended by option 'opatch_pre_end'. |
|
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. |
|
Prints the actions to the screen without executing them. |
|
Instructs OPatch how many times it should retry when there is an inventory lock failure. |
|
Suppresses user interaction, and defaults any yes|no questions to "yes". An Oracle Real Application Clusters setup does not support this option. |
|
Prints additional OPatch output to the screen as well as to the log file. |
'opatch nrollback -id 1,2,3' to roll back patches 1, 2, and 3 that have been installed in the Oracle Home. 'opatch nrollback -id 1/fr,2/de to rollback patches 1 with language 'fr', 2 with language 'de' that have been installed in the Oracle Home.
rollback
The rollback
command removes an existing one-off patch from the appropriate GI/RAC home directory indicated by the reference ID. The following syntax is used for this command:
opatch rollback -id <ID> [-connectString <List of connect strings>] [-delay <value>] [-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ] [-local] [-local_node <Local node name>] [-no_inventory] [-no_relink] [-no_sysmod] [-oh <ORACLE_HOME>] [-ph <Patch Location>] [-post <parameters for the post script in escaped double quotes>[ -opatch_post_end] ] [-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ] [-property_file <path to property file>] [-ptlConnect <portal connect string>] [-ptlPassword <portal password>] [-ptlSchema <portal schema>] [-remote_nodes <List of remote nodes (node1,node2)>] [-retry <value>] [-runSql] [-silent] [-sqlScript <path of the sql file>] [-verbose] [all_subpatches]
Table A-7 describes the options available for the rollback
command.
Table A-7 rollback
Command Options
Option | Description |
---|---|
|
If you use the |
|
Indicates the patch to be rolled back. Use the |
|
Specifies the location of the |
|
Specifies the location of a particular JRE (Java) for OPatch to use instead of the default location under the GI/RAC home directory. |
|
Specifies that OPatch roll back the local node, then updates 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. |
|
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. |
no_relink |
Do not perform the make operations in the patch. This option can be used during multiple patch removals and perform the compilation step only once. |
|
Specifies the GI/RAC home directory to use instead of the default directory. This takes precedence over the |
|
Marks the end of the |
|
Marks the end of the |
|
Specifies the valid patch directory area. Rollback uses the command types found in the patch directory to identify which commands are used for the current operating system. |
|
Specifies the parameters to be passed inside the |
|
Specifies the parameters to be passed inside the |
|
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. |
|
Prints the actions to the screen without executing them. |
|
Instructs OPatch how many times it should retry when there is an inventory lock failure. |
|
Suppresses user interaction, and defaults any yes|no questions to "yes". An Oracle Real Application Clusters setup does not support this option. |
sqlScript |
This option can be used to specify the custom SQL script to be run by OPatch after patching is completed |
|
Prints additional OPatch output to the screen as well as to the log file. |
all_subpatches |
This option is valid ONLY for composite patches. It allows the user to rollback all sub-patches of a composite series in one shot. |
query
The query
command queries a specific patch for specific details. It provides information about the patch and the system being patched.
Use the following syntax for this command:
opatch query [-all] [-is_auto_patch] [-is_translatable_patch] [-get_base_bugs] [-get_component] [-get_os] [-get_date] [-get_patch_language] [-get_patch_type] [-get_patching_model] [-get_product_family] [-has_sql] [-is_online_patch] [-is_rolling_patch] [-is_system_patch] [-jre <LOC> ] [-oh <LOC> ] [ <patch_location> ]
Table A-8 lists the options available for the query
command.
Table A-8 query Command Options
Option | Description |
---|---|
|
Retrieves all information about a patch. This is equivalent to setting all available options. |
is_auto_patch |
This option says 'true' if the patch is auto-enabled, 'false' otherwise. This command doesn't support System Patch. |
is_system_patch |
This option says 'true' if the patch is a System Patch, 'false' otherwise. |
is_translatable_patch |
This option says 'true' if the patch is translatable, 'false' otherwise. This option doesn't support System Patch. |
|
Retrieves bugs fixed by the patch. |
|
Retrieves components the patch affects. |
|
Retrieves the patch creation date and time. |
get_os |
Get platforms for which this patch could be applied. This option does not support System Patch. |
get_patch_language |
Get the language supported by the patch. This option doesn't support System Patch. |
get_product_family |
Get the product family to which the patch belongs. This option does not support System Patch. |
|
Indicates true if the patch is an online patch. Otherwise, the option is false. |
|
Indicates true if the patch is a rolling patch. Otherwise, the option is false. |
jre |
This option tells OPatch to use JRE (java) from the specified location instead of the default location under GI/RAC home. |
|
Specifies the GI/RAC home directory to use instead of the default directory. This takes precedence over the |
version
The version
command shows the current version number of the OPatch utility.
The following syntax is used for this command:
opatch version [-all] [-invPtrLoc <Path to oraInst.loc>] [-jre <LOC>] [-oh <ORACLE_HOME>] [-v2c <5-digit version> -oui_loc <Custom OUI Location> -ph <Patch Location> -ohs <list of Oracle Homes separated by commas] [-help] [-h]
Table A-9 version
Command Options
Option | Description |
---|---|
|
This option displays versions of OPatch for all product (e.g., Fusion Middleware) homes registered in the Central Inventory. |
invPtrLoc |
Used to locate the oraInst.loc file. When the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file. |
jre |
This option tells OPatch to use JRE (java) from the specified location instead of the default location under GI/RAC home. |
oh |
The GI/RAC home to work on. This takes precedence over the environment variable ORACLE_HOME |
|
The standard 5-digit version to compare. If this option is specified with an valid version which made by no more than 5 numbers separated by '.', those product (e.g., Fusion Middleware) homes with valid version will be break up to two parts, one is those product (e.g., Fusion Middleware) homes which have opatch version higher or equal to the value of this option, and the other is those with lower version |
|
The patch location from where the Minimum OPatch Version (if defined) will be picked. If a valid patch location is provided, will take the required minimum opatch version from the patch and set it as the standard OPatch version to be compared to. |
|
List of product (e.g., Fusion Middleware) homes to be considered. Please provide them separated by commas |
help |
Display valid options can be attached to this operation. |
This operation runs the prerequisite checks on an ORACLE_HOME. This command does not support System Patches.
opatch prereq <command> [-id <Comma separated list of patch IDs>] [-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC>] [-local_node <Local node name>] [-oh <ORACLE_HOME> ] [-ph <Path to the single patch location>] [-phBaseDir <Path to the dir containing all patches>] [-phBaseFile <Path to the file containing the location of the patches to be applied>] [-property_file <Path to property file>] [-remote_nodes <List of remote nodes (node1,node2)>] [-sid <Comma separated list of database SIDs>] [-connectString <List of connect strings>]
The prereq
command executes commands that check for the prerequisite conditions shown in the table.
Command | Description |
---|---|
|
Check if there are any file(s) that are active, which are touched by the patch to be applied or rolled back. |
CheckActiveServices |
Check for the services that are active. Note: Applicable for Windows platforms only. |
CheckApplicable |
Check for the presence of the required components in the ORACLE_HOME and check if all the actions of the given patch(es) are applicable. |
CheckApplicableProduct |
Check if the patch is applicable for the given GI/RAC home. If the patch is marked for stand-alone homes, then it can not be applied on normal OUI-based home and vice versa. Also, a patch can be marked as a hybrid patch, where it is applicable for both homes. |
CheckCentralInventoryForOH |
Check if the given ORACLE_HOME is registered in the central inventory specified by the oraInst.loc file. |
CheckCentralInventoryForRWSession |
Check if a RW (read-write) session can be created for the given central inventory. |
CheckCentralInventoryLocation |
Validate the Central Inventory location. Check if it has the correct directory structure and has the inventory.xml with read permissions. |
CheckComponents |
Check for the presence of the required components in the ORACLE_HOME. |
CheckConflictAgainstOH |
Check if there are any conflicts between the patch(es) to be applied and the patch(es) in the OH. |
CheckConflictAgainstOHWithDetail |
Check if there are any conflicts between the patch(es) to be applied and the patch(es) in the OH, by giving out the detailed information about the conflicts/supersets. |
CheckConflictAmongPatches |
Check if there are any conflicts among the patch(es) to be applied. |
CheckConflictAmongPatchesWithDetail |
Check if there are any conflicts among the patch(es) to be applied, by giving out the detailed information about the conflicts/supersets. |
CheckFileVersions |
Check if the copy actions of Fusion Applications patch(es) have at least one or more file version(s) greater than the version(s) installed in the GI/RAC home. |
CheckFusionAppsCompatible |
Check if OUI for the GI/RAC home supports patching of Fusion applications. |
CheckForIdenticalPatchInOracleHome |
Check if the given list of patch(es) are identical with respect to the patch(es) installed in the GI/RAC home. |
CheckForInputValues |
Check if the input values provided to OPatch are enough for OPatch to proceed further. |
CheckForNoOpPatches |
Check if any of the patch(es) provided by the user are no-op patches. A no-op patch cannot be applied to the GI/RAC home and can be skipped. This prerequisite will fail for no-op. patches. |
CheckIfOHLockedForPatching |
Check if the ORACLE_HOME is locked for patching by any previous unsuccessful OPatch Session. |
CheckInstalledOneOffs |
Check if all the patches provided by the user to rollback are present in the given GI/RAC home. |
CheckMinimumOPatchVersion |
Check if all the patches provided by the user satisfy the requirement of minimum OPatch version for the OPatch currently being used. |
CheckOneOffSuperset |
Check if the given input Fusion Applications patch list are all candidates for one-off (or) singleton supersets. This prereq does not do any checks among the input patch list. |
CheckOracleHome |
Check if the given ORACLE_HOME is valid. Check if it has the inventory files with proper permissions. |
CheckOraInstLocation |
Check if the oraInst.loc file is proper and has the read permissions. |
CheckOUILocation |
Check the ORACLE_HOME for the presence of OUI. |
CheckOUIVersionCompatible |
Check if the OUI in the ORACLE_HOME is compatible for the OPatch. |
CheckPatchApplicableOnCurrentPlatform |
Check if the given patch(es) is applicable on the current platform. |
CheckPatchApplyDependents |
Check if all the patch(es) required by the patch(es) currently being installed is present in the GI/RAC home or not. |
CheckPatchRollbackDependents |
Check if there are any patch(es) in the GI/RAC home that are depending on the patch(es) being currently rolled back. |
CheckPatchShipHome |
Check if the given patch to be applied has the proper structure and has the correct permissions for all the files. |
CheckRemoteCommandInvocable |
Check if commands can be invoked on the remote machines. |
CheckRemoteCopyAndRemove |
Check if files can be copied to and removed from the remote machines. |
CheckRequiredLibs |
Check if all the required OUI libraries are present in the given ORACLE_HOME. |
CheckRollbackable |
Check if the given patch(es) can be rolled back from the ORACLE_HOME. |
CheckSystemCommandAvailable |
Check if all the commands required for applying or rolling back the given patch are present in the system. |
CheckSystemSpace |
Check if enough system space is available for the patch(es) to be applied. |
CheckUserAdminPrivilege |
Check is the user is 'root'. Note: OPatch should not be invoked by 'root', if so then this check fails. |
CheckPatchingModel |
Check if the patching model of all incoming patch(es) is compatible with that of the GI/RAC home. |
Option | Description |
---|---|
|
This option can be used to specify the list of database instances and remote nodes. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.Example: oracle:dba:dba:mymachine,oracle1:::NOTE: If the system is not part of RAC setup, then to specify just the local node, provide the node name as empty string. This option cannot be used along with 'sid' option. |
id |
This option can be used to specify the patch IDs of all the patches that are to be rolled back from the given GI/RAC home. |
invPtrLoc |
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file. |
jre |
This option tells OPatch to use JRE (java) from the specified location instead of the default location under GI/RAC home. |
local_node |
This option can be used to specify to OPatch the local node name to be used for RAC mode application of the patch. |
oh |
The GI/RAC home to work on. This takes precedence over the environment variable ORACLE_HOME. |
ph |
This option can be used to specify the path to the patch location. Example: /tmp/101010 |
phBaseDir |
This option can be used to specify the path to the base directory where all the patches to be applied are kept. Note: The directory should contain only non-duplicate patches in zipped or unzipped format. |
phBaseFile |
This option can be used to specify complete path to the file containing the location of the patches to be applied. |
property_file |
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 is supplied with OPatch. |
sid |
This option can be used to specify the SIDs of the database instances. This option can be used only for local system operations. |
util
The util
command invokes the chosen utilities on an ORACLE_HOME. This command does not support System Patches.
opatch util [ -help ] [ COMMAND ]
Run opatch util [ COMMAND ] -help
to get help on a specific command.
Option | Description |
---|---|
|
Check if a patch is compatible with the given OPatch version. |
CheckComponents |
Check if the given patch is suitable for the product (e.g., Fusion Middleware) homes registered in the Central Inventory by components check. |
Cleanup |
Remove the backup for restore area of the given patch or for all the patches. |
DisableOnlinePatch |
Disable and remove the specified online patch(es) on the given database instances. |
EnableOnlinePatch |
Install and enable the specified online patch(es) on the given database instances. |
GetPatchLevel |
Return the patching level on Local Grid Home. |
InstallOCM |
Install and configure OCM. |
LoadXML |
Prompt for path/name of the XML file, then check if the XML is correct. |
SaveConfigurationSnapshot |
Save configuration snapshot of current GI home to specified file. ORACLE_HOME shall point to GI home. Default snapshot file is ORACLE_HOME/cfgtoollogs/opatch/sysconfig/configData.txt |
UpdateOPatchVersion |
Update the version of OPatch in the inventory of GI/RAC home. |
Verify |
Using the defined ORACLE_HOME and given patch location via -ph, the program will check to make sure the patch was applied to the ORACLE_HOME.Example: 'opatch util verify -ph /tmp/patchLoc' |