opatch命令引數解析
[oracle@slient ~]$ opatch
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Syntax Error... No command specified.
Usage: opatch [ -help ] [ -report ] [ command ]
command := apply
lsinventory
lspatches
napply
nrollback
rollback
query
version
prereq
util
:= -help Displays the help message for the command.
-report Print the actions without executing.
example:
'opatch -help'
'opatch -help -fmw'
'opatch auto -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch lspatches -help'
'opatch napply -help'
'opatch nrollback -help'
'opatch rollback -help'
'opatch prereq -help'
'opatch util -help'
OPatch failed with error code 14
[oracle@slient ~]$
[oracle@slient ~]$ opatch auto -help
Usage:
:
: opatch auto -h # to see this message
:
: This command must be run as root user and needs Opatch version
: 10.2.0.4.7 or above.
: Case 1 - On each node of the CRS cluster in case of Non Shared CRS Home.
: Case 2 - On any one node of the CRS cluster is case of Shared CRS home.
:
:
:PARAMETERS
:
:Patch Location
: Path to the location for the patch. If the patch
: location is not specified, then the current directory
: is taken as the patch location
:OPTIONS
:
: -rollback The patch will be rolled back, not applied
:
:
: -oh comma seperated list of 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 Oracle Clusterware home.
: use this option to patch only clusterware home
: with stack down.Do not use this option with CRS
: stack up. This only patches the Clusterware home
:
:
: Suggested mode of operation:
:
:# 1. apply the patch with the unzipped patch location
: This applies the patch to all applicable homes on the machine
:
: opatch auto <Patch Location>
:
:# 2. Rollback the patch.
: This rolls back the patch from all the applicable homes on the machine
:
: opatch auto -rollback <Patch Location>
:
:# 3. apply the patch with -oh option
: This option allows to apply patch on selective list of oracle homes
:
: opatch auto <Patch Location> -oh /ora/oh1,/ora/oh2,/ora/oh3
:
:# 4. apply the patch with -och option
: This option is used to only patch the CRS home when
: Clusterware stack is down.
:
: opatch auto <Patch Location> -och /ora/ora_crs_home
:
[oracle@slient ~]$
[oracle@slient ~]$ opatch apply -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation applies an interim patch to an ORACLE_HOME from
the current directory. The patch location can specified using
the parameter patch_location.
SYNTAX
opatch apply [-connectString ]
[-delay ] [ -force ] [ -force_conflict ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [-local ] [-local_node ]
[-minimize_downtime ] [-no_bug_superset ] [-no_inventory ]
[-no_relink] [-no_sysmod] [-ocmrf ]
[-oh ]
[-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 ]
[-property_file ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry <value ]="" [-runsql="" ]
[silent ] [-sqlScript ] [-verbose ]
[ ]
OPTIONS
-all_nodes
Apply the patch using all-node mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this options tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-force
This option is meaningful with 'silent' option and is used
to override the behavior of silent under specific
circumstances.
-force_conflict
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.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. This option should be ended by option
'opatch_init_end'.
-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 Oracle Home.
-local
Patch the local node, then update inventory of the
local node. Do not propagate the patch or inventory
update to other nodes.
-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
-minimize_downtime
Only applied to RAC instances. User supplies the
order of nodes to be patched. This option cannot be
used in conjunction with -local option with a rolling
patch.
-no_bug_superset
This option tells OPatch to error out if the current
patch's bugs-to-fix is a super-set (or same set) of an
installed patch's bugs-fixed in the Oracle Home.
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
-no_relink
The nolink option does not perform any make operations.
This option can be used during multiple patch
applications and perform the linking step only once.
OPatch does not keep track of the make operations it
did not perform. It is the job of the OPatch users to
make sure the execute OPatch without this option at
the end, so that compilation happens once
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts
-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 Oracle Home doesn't have
OCM installed and configured.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-post
This option is used to pass parameters to the post script.
This script is executed after application of the patch.
The value for this option have to be enclosed in double
quotes. 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 application of
the patch. The value for this option have to be enclosed
in double quotes. This option should be ended by option
'opatch_pre_end'.
-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.
-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
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces
-report
Just prints out the actions without executing
-retry
This option tells OPatch how many times it should retry
in case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen as
well as to the log file
PARAMETERS
Patch Location
Path to the location for the patch. If the patch
location is not specified, then the current directory
is taken as the patch location.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch lsinventory -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
List the inventory for a particular $ORACLE_HOME or display all
installations that can be found.
SYNTAX
opatch lsinventory [-all ] [-all_nodes] [-bugs_fixed ]
[-delay ] [-detail ] [-group_by_date ]
[-inactive]
[-invPtrLoc ]
[-jre ] [-local ]
[-oh ] [-patch ]
[-patch_id ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-property_file ]
[-retry ] [-translation_patch ]
OPTIONS
-all
Report the name and installation directory for each
$ORACLE_HOME found.
-all_nodes
Reports the patches installed on the given Oracle Home
in all nodes of the RAC system. It also prints the oracle
binary's size and checksum on all nodes. This option cannot
be used in conjunction with -all, -detail, -patch.
-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_id option to
obtain sort orders with installed patches.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-detail(s)
Report installed products and other details. This
option cannot be used in conjunction with all option.
-group_by_date
This option tells OPatch to group all installed
patches by the date they were installed in the
Oracle Home
-inactive
This option lists all the inactive patches that have been
superseded by other superset patch(es) installed in the
Oracle Home
-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 Oracle Home
-local
This option tells OPatch to display inventory
information of the local node only
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-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.
-patch_id
Lists the patch IDs installed in the oracle home
in ascending (asc) or descending (desc) order based on
patch numbers. The value defaults to ascending (asc).
-ptlConnect
This option is used to specify the connect string credentials
of the portal schema
-ptlPassword
This option is used to specify the password of the portal
schema
-ptlSchema
This option is used to specify the schema of the portal
repository
-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
-retry
This option tells OPatch how many times it should
retry in case of an inventory lock failure
-translation_patch
Report installed translation patch(es) in a tabular format.
The report displays translation patch, unique patch identifier,
language code, installed time of the translation patch and base
patch for any single row in the table.
PARAMETERS
This operation does not have any required parameters.
OPatch succeeded.
[oracle@slient ~]$ opatch lspatches -help
DESCRIPTION
List and verify patch metadata specified by patch ID (installed in
ORACLE_HOME) or patch location.
SYNTAX
opatch lspatches [-id ]
[-qfile ]
[ -bugs ]
[ -verify ]
[ -required ]
[-invPtrLoc ]
[-jre ]
[-oh ]
[ ]
OPTIONS
-id
This option specifies the patch number. It must be registered
in the Oracle Home inventory. It can be any numeric sequence or
combined with language. Ex. 11111, 11111/zh_CN. It can't support
multiple patch IDs.
-qfile
Specify the relative path to Oracle Home of the file to determine
the latest patch that touches this file.
Ex. On Linux: admin/rdbms/catcpu.sql
On Windows: admin\rdbms\catcpu.sql
OPatch can tell which latest patch touches the file catcpu.sql
in Oracle Home.
-bugs
Print bugs info for every patch.
-verify
This option would verify if the specified patch ID or patch
location is registered in Oracle Home inventory or not. Besides,
it will verify if all patch files are ok in $ORACLE_HOME.
This option should be accompanied by either option -id
or .
Ex. opatch lspatches -id 111 -verify
opatch lspatches /scratch/test/111 -verify
-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
or .
-invPtrLoc
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 Oracle Home
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
[oracle@slient ~]$
[oracle@slient ~]$ opatch napply -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation is used to Apply a set of patches at a time.
Use -silent to apply the patches in silent mode.
SYNTAX
opatch napply [patch_location] [-id comma-separated list of patch IDs]
[ -all_nodes ]
[-connectString ]
[-delay ] [ -force ] [ -force_conflict ]
[-idFile <path of="" the="" file="" that="" has="" list="" patch="" ids="" ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [ -local ]
[ -local_node ]
[-minimize_downtime ] [-no_bug_superset ]
[-no_inventory ] [-no_relink]
[-no_sysmod] [-ocmrf ]
[-oh ]
[ -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 ]
[ -property_file ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[ -remote_nodes ]
[-retry ] [-runSql] [-silent ]
[-skip_subset] [-skip_duplicate]
[-sqlScript ] [-verbose ]
OPTIONS
-all_nodes
Apply the patch using all-node mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this options tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-force
This option is meaningful with 'silent' option and is used
to override the behavior of silent under specific
circumstances.
-force_conflict
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.
-id
Use '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
/.
-idFile
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
/.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. The parameters will be common parameters
which will be passed to init scripts of all patches being
applied. This option should be ended by option
'opatch_init_end'.
-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 Oracle Home.
-local
Patch the local node, then update inventory of the
local node. Do not propagate the patch or inventory
update to other nodes.
-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.
-minimize_downtime
Only applied to RAC instances. User supplies the
order of nodes to be patched. This option cannot be
used in conjunction with -local option with a rolling
patch.
-no_bug_superset
This option tells OPatch to error out if the current
patch's bugs-to-fix is a super-set (or same set) of an
installed patch's bugs-fixed in the Oracle Home.
-no_inventory
Bypass the inventory for reading and updates.
-no_relink
The nolink option does not perform any make operations.
This option can be used during multiple patch.
applications and perform the linking step only once.
OPatch does not keep track of the make operations it
did not perform. It is the job of the OPatch users to
make sure the execute OPatch without this option at
the end, so that compilation happens once.
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts.
-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 Oracle Home doesn't have
OCM installed and configured.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME.
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-phBaseDir
Used to specify a directory containing patch directories (or)
zip files.
-phBaseFile
If is not specified, 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.
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-post
This option is used to pass parameters to the post script.
This script is executed after application 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 applied.
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 application 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
applied. This option should be ended by option
'opatch_pre_end'.
-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.
-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.
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces.
-report
Just prints out the actions without executing.
-retry
This option tells OPatch how many times it should retry
in case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction.
-skip_duplicate
This 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
This skips patches to be applied that are subset 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.
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen as
well as to the log file.
Example:
'opatch napply ' to apply all patches under
directory
'opatch napply -id 1,2,3' to apply patches
1, 2, and 3 which are present under
directory
'opatch napply -skip_subset -skip_duplicate'
to apply all patches under directory.
OPatch will skip duplicate patches and subset patches
(patches under that are subsets of patches
installed in the Oracle Home)
'opatch napply -id 1,2,3 -skip_subset -skip_duplicate'
to apply patches 1, 2, and 3 which are under
diretory. OPatch will skip duplicate patches and subset patches
(patches under that are subsets of patches
installed in the Oracle Home)
'opatch napply -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 -id 1/fr,2/de' to apply patches 1 (french
patch), 1 (german patch) which are present in the directory.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch nrollback -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation is used to Rollback a set of patches at a time.
Use -silent to Rollback the patches in silent mode.
SYNTAX
opatch nrollback -id
[ -all_nodes ]
[-connectString ]
[-delay ] -id
[-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 ]
[-jre ] [-local]
[-local_node ]
[-no_inventory] [-no_relink] [-no_sysmod]
[-oh ]
[-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 ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry ] [-runSql] [-silent]
[-sqlScript ] [-verbose]
OPTIONS
-all_nodes
Rollback the patch using all-nodes mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-id
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. A comma
separated list of patches to be rolled back must be given.
For translation patches, the patch id should be of the
format / (ex: 1234/fr)
-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 /.
This option cannot to be in conjunction with 'id' option.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. The parameters will be common parameters which
will be passed to init scripts of all patches being rolled back.
This option should be ended by option 'opatch_init_end'.
-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 Oracle Home.
-local
Roll back then update inventory of the local node.
Do not propagate the patch or inventory update to other
nodes.
-local_node
This option can be used to specify to OPatch the local
node name to be used for RAC mode rollback of the patch.
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
NOTE: -phBaseDir or -phBaseFile has to be used to
specify the patch location(s).
-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.
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME.
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-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'.
-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.
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode rollback of
the patch. The node names are comma separated and
without spaces.
-report
Just prints out the actions, without executing.
-retry
This option tells OPatch how many times should retry in
case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction and defaults any
Y|N question to Y. This option is not supported on
RAC yet.
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen
as well as to the log file.
Example:
'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.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch rollback -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
Roll back an existing patch indicated by the reference-id.
SYNTAX
opatch rollback -id [-connectString ]
[-delay ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [-local]
[-local_node ] [-no_inventory]
[-no_relink] [-no_sysmod]
[-oh ] [-ph ]
[-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 ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry ] [-runSql] [-silent]
[-sqlScript ] [-verbose]
[all_subpatches]
OPTIONS
-all_nodes
Roll back the patch using all-nodes mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-id
Use 'lsinventory' option to display all patch id's.
Each one-off patch is indicated by its id. To roll back
a patch the id for that patch must be supplied. For
translation patches, Please specify /
(ex: 1234/fr)
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. This option should be ended by
option 'opatch_init_end'.
-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 Oracle Home.
-local
Roll back then update inventory of the local node.
Do not propagate the patch or inventory update to other
nodes
-local_node
This option can be used to specify to OPatch the local
node name to be used for RAC mode rollback of the patch
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
NOTE: ph has to be used to specify the patch location.
-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
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-ph
Specify the valid patch directory area. Rollback will
use the command types found in the patch directory to
identify what commands are to be used for the current
operating system
-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. 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. This option should be ended by option
'opatch_pre_end'.
-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
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode rollback of
the patch. The node names are comma separated and
without spaces
-report
Just prints out the actions, without executing
-retry
This option tells OPatch how many times should retry in
case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction and defaults any
Y|N question to Y. This option is not supported on
RAC yet
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more 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 subpatches of a composite series
in one shot.
PARAMETERS
Patch ID of the patch to be rolled back unless the command is
invoked within a patch area. For translation patches, it will
be /.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch query -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation loads and prints out various information about a patch.
Parameter patch_location points to where a patch is located.
For example, if you specify "path", there should be sub-dir.
"etc/config" under "path".
SYNTAX
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] [-get_update_components] [-has_sql]
[-is_online_patch] [-is_patchset_update]
[-is_portal_patch] [-is_rolling_patch]
[-jre ] [-oh ]
[ ]
OPTIONS
-all
Get everything available 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.
-is_translatable_patch
This option says 'true' if the patch is translatable,
'false' otherwise.
-get_base_bug
Get bugs fixed by the patch
-get_component
Get components touched by the patch.
-get_update_components
Get all components to be upgraded in a Patchset Update.
-get_date
Get patch creation date and time.
-get_os
Get platforms for which this patch could be applied.
-get_patch_type
Get the patch type.
-get_patching_model
Get the patching model.
-get_patch_language
Get the language supported by the patch.
-get_product_family
Get the product family to which the patch belongs.
-has_sql
This option says 'true' if the patch has sql related actions,
'false' otherwise.
-is_online_patch
This option says 'true' if the patch is a online patch,
'false' otherwise.
-is_patchset_update
This option says 'true' if the patch is a Patchset Update,
'false' otherwise.
-is_portal_patch
This option says 'true' if the patch has portal actions,
'false' otherwise.
-is_rolling_patch
This option says 'true' if the patch is a rolling patch,
'false' otherwise.
-jre
This option tells OPatch to use JRE (java) from the specified
location instead of the default location under Oracle Home.
-oh
The oracle home to work on. This takes precedence over the
environment variable ORACLE_HOME.
PARAMETERS
The location of the patch to be queried.
If the patch location is not specified, then the current directory
is taken as the patch location.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch version -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
Print the version of OPatch for a particular $ORACLE_HOME or display all
OPatch version in the Central Inventory.
SYNTAX
opatch version [-all] [-invPtrLoc ]
[-jre ] [-oh ]
[-v2c <5-digit version=""> -oui_loc
-ph -ohs <list of="" oracle="" homes
separated by commas]
[-help] [-h]
OPTIONS
-all
This option displays versions of OPatch(es) of all
Oracle 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 Oracle Home
-oh
The Oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-v2c
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 oracle homes
with valid version will be break up to two parts, one
is those oracle homes which have opatch version higher
or equal to the value of this option, and the other is
those with lower version
-ph
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
-ohs
List of Oracle Homes to be considered. Please provide
them separated by commas
-help (or) -h
Display valid options can be attached to this opereation
PARAMETERS
This operation does not have any required parameters.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch prereq -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation runs the prerequisite checks on an ORACLE_HOME.
SYNTAX
opatch prereq [-id ]
[-invPtrLoc ]
[-jre ] [-local_node ]
[-oh ]
[-ph ]
[-phBaseDir ]
[-phBaseFile <path to="" the="" file="" containing="" the
location of the patches to be applied>]
[-property_file ]
[-remote_nodes ]
[-sid ]
[-connectString ]
COMMANDS
CheckActiveFilesAndExecutables
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 Oracle 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.
CheckFusionAppsCompatible
Check if OUI for the Oracle Home supports patching of
Fusion applications.
CheckForCRSHomeIfRAC
Check if the given Central Inventory has a CRS Home
registered with it, if it is a RAC setup.
CheckForIdenticalPatchInOracleHome
Check if the given list of patch(es) are identical with
respect to the patch(es) installed in the Oracle Home.
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 Oracle Home
and can be skipped. This prereq 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 Oracle Home.
CheckMinimumOPatchVersion
Check if all the patches provided by the user satisfy
the requirement of minimum OPatch version for the OPatch
currently being used.
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 Oracle Home or not.
CheckPatchRollbackDependents
Check if there are any patch(es) in the Oracle 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.
CheckRACNodeList
Check if all the nodes in the RAC setup are valid, up
and reachable.
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.
CheckRollbackSid
Check if the given patch(es) can be rolled back from
the ORACLE_HOME using the given SIDs.
CheckStandAloneHome
Check if the Oracle Home is a stand-alone home or a
normal oui-based 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 Oracle Home.
CheckPatchsetUpdateCompatible
Check if the given patches and the OUI together are
Patch Set Update compatible.
CheckPatchsetUpdateComponents
Check if the components to be upgraded in the Patch Set
Update are valid.
OPTIONS
-connectString
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.
Ex: 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 rollbacked from the given OH.
-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 Oracle 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 oracle 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. Ex: /tmp/101010
-phBaseDir
This option can be used to specify the path to base dir
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.
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces.
-sid
This option can be used to specify the SIDs of the database
instances. This option can be used only for local system
operations.
OPatch succeeded.
[oracle@slient ~]$ opatch util -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation invokes the chosen utilities on an ORACLE_HOME.
SYNTAX
opatch util [ -help ] [ COMMAND ]
Use opatch util [ COMMAND ] -help to get help on a particular command.
COMMANDS
ApplySql
Apply sql, sql procedure related actions for patches, which
are already applied using Apply or NApply operation.
CheckMinimumOpatchVersion
Check if patch is compatible with the given user input version
CheckComponents
Check if the given patch is suitable for the Oracle 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.
CopyListedDirs
Recursively copy all directories listed in
ORACLE_HOME/.patch_storage//rac/copy_dirs.txt
to remote nodes.
CopyListedDirsTest
Recursively copy a single directory to remote nodes.
CopyListedFiles
Copy all files listed in
ORACLE_HOME/.patch_storage//rac/copy_files.txt
to remote nodes.
CopyListedFilesTest
Copy a single file to remote nodes.
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.
InstallOCM
Install and configure OCM.
IsShared
Returns true if running on shared environment, else it returns
false.
LoadXML
Prompt for path/name of the XML file, then check if the
XML is correct.
RemoveListedDirs
Recursively remote directories listed in
ORACLE_HOME/.patch_storage//rac/remove_dirs.txt
on remote nodes.
RemoveListedDirsTest
Recursively remove a directory on remote nodes.
RemoveListedFiles
Remove files listed in
ORACLE_HOME/.patch_storage//rac/remove_files.txt
on remote nodes.
RemoveListedFilesTest
Remove a single file on remote nodes.
RestoreOH
Restore the OracleHome to the previous state.
RollbackSql
Rollback sql, sql procedure related actions for patches, which
are already rolled back using Rollback or NRollback operation.
RunAnyCommand
Run any command on remote nodes.
RunLocalMake
Invoke re-link on the local node. Commands are stored in
ORACLE_HOME/.patch_storage//make.txt.
RunRemoteMake
Invoke re-link on remote nodes. Commands are stored in
ORACLE_HOME/.patch_storage//rac/make_cmds.txt.
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/oplan/configData.xml
UpdateRemoteNodes
Propagate/Remove files/directories to/on remote nodes
using files under ORACLE_HOME/.patch_storage//rac/*.
UpdateOPatchVersion
Update the version of OPatch in the inventory of
Oracle 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'
OPatch succeeded.
[oracle@slient ~]$
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Syntax Error... No command specified.
Usage: opatch [ -help ] [ -report ] [ command ]
command := apply
lsinventory
lspatches
napply
nrollback
rollback
query
version
prereq
util
:= -help Displays the help message for the command.
-report Print the actions without executing.
example:
'opatch -help'
'opatch -help -fmw'
'opatch auto -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch lspatches -help'
'opatch napply -help'
'opatch nrollback -help'
'opatch rollback -help'
'opatch prereq -help'
'opatch util -help'
OPatch failed with error code 14
[oracle@slient ~]$
[oracle@slient ~]$ opatch auto -help
Usage:
:
: opatch auto -h # to see this message
:
: This command must be run as root user and needs Opatch version
: 10.2.0.4.7 or above.
: Case 1 - On each node of the CRS cluster in case of Non Shared CRS Home.
: Case 2 - On any one node of the CRS cluster is case of Shared CRS home.
:
:
:PARAMETERS
:
:Patch Location
: Path to the location for the patch. If the patch
: location is not specified, then the current directory
: is taken as the patch location
:OPTIONS
:
: -rollback The patch will be rolled back, not applied
:
:
: -oh comma seperated list of 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 Oracle Clusterware home.
: use this option to patch only clusterware home
: with stack down.Do not use this option with CRS
: stack up. This only patches the Clusterware home
:
:
: Suggested mode of operation:
:
:# 1. apply the patch with the unzipped patch location
: This applies the patch to all applicable homes on the machine
:
: opatch auto <Patch Location>
:
:# 2. Rollback the patch.
: This rolls back the patch from all the applicable homes on the machine
:
: opatch auto -rollback <Patch Location>
:
:# 3. apply the patch with -oh option
: This option allows to apply patch on selective list of oracle homes
:
: opatch auto <Patch Location> -oh /ora/oh1,/ora/oh2,/ora/oh3
:
:# 4. apply the patch with -och option
: This option is used to only patch the CRS home when
: Clusterware stack is down.
:
: opatch auto <Patch Location> -och /ora/ora_crs_home
:
[oracle@slient ~]$
[oracle@slient ~]$ opatch apply -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation applies an interim patch to an ORACLE_HOME from
the current directory. The patch location can specified using
the parameter patch_location.
SYNTAX
opatch apply [-connectString ]
[-delay ] [ -force ] [ -force_conflict ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [-local ] [-local_node ]
[-minimize_downtime ] [-no_bug_superset ] [-no_inventory ]
[-no_relink] [-no_sysmod] [-ocmrf ]
[-oh ]
[-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 ]
[-property_file ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry <value ]="" [-runsql="" ]
[silent ] [-sqlScript ] [-verbose ]
[ ]
OPTIONS
-all_nodes
Apply the patch using all-node mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this options tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-force
This option is meaningful with 'silent' option and is used
to override the behavior of silent under specific
circumstances.
-force_conflict
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.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. This option should be ended by option
'opatch_init_end'.
-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 Oracle Home.
-local
Patch the local node, then update inventory of the
local node. Do not propagate the patch or inventory
update to other nodes.
-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
-minimize_downtime
Only applied to RAC instances. User supplies the
order of nodes to be patched. This option cannot be
used in conjunction with -local option with a rolling
patch.
-no_bug_superset
This option tells OPatch to error out if the current
patch's bugs-to-fix is a super-set (or same set) of an
installed patch's bugs-fixed in the Oracle Home.
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
-no_relink
The nolink option does not perform any make operations.
This option can be used during multiple patch
applications and perform the linking step only once.
OPatch does not keep track of the make operations it
did not perform. It is the job of the OPatch users to
make sure the execute OPatch without this option at
the end, so that compilation happens once
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts
-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 Oracle Home doesn't have
OCM installed and configured.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-post
This option is used to pass parameters to the post script.
This script is executed after application of the patch.
The value for this option have to be enclosed in double
quotes. 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 application of
the patch. The value for this option have to be enclosed
in double quotes. This option should be ended by option
'opatch_pre_end'.
-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.
-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
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces
-report
Just prints out the actions without executing
-retry
This option tells OPatch how many times it should retry
in case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen as
well as to the log file
PARAMETERS
Patch Location
Path to the location for the patch. If the patch
location is not specified, then the current directory
is taken as the patch location.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch lsinventory -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
List the inventory for a particular $ORACLE_HOME or display all
installations that can be found.
SYNTAX
opatch lsinventory [-all ] [-all_nodes] [-bugs_fixed ]
[-delay ] [-detail ] [-group_by_date ]
[-inactive]
[-invPtrLoc ]
[-jre ] [-local ]
[-oh ] [-patch ]
[-patch_id ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-property_file ]
[-retry ] [-translation_patch ]
OPTIONS
-all
Report the name and installation directory for each
$ORACLE_HOME found.
-all_nodes
Reports the patches installed on the given Oracle Home
in all nodes of the RAC system. It also prints the oracle
binary's size and checksum on all nodes. This option cannot
be used in conjunction with -all, -detail, -patch.
-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_id option to
obtain sort orders with installed patches.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-detail(s)
Report installed products and other details. This
option cannot be used in conjunction with all option.
-group_by_date
This option tells OPatch to group all installed
patches by the date they were installed in the
Oracle Home
-inactive
This option lists all the inactive patches that have been
superseded by other superset patch(es) installed in the
Oracle Home
-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 Oracle Home
-local
This option tells OPatch to display inventory
information of the local node only
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-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.
-patch_id
Lists the patch IDs installed in the oracle home
in ascending (asc) or descending (desc) order based on
patch numbers. The value defaults to ascending (asc).
-ptlConnect
This option is used to specify the connect string credentials
of the portal schema
-ptlPassword
This option is used to specify the password of the portal
schema
-ptlSchema
This option is used to specify the schema of the portal
repository
-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
-retry
This option tells OPatch how many times it should
retry in case of an inventory lock failure
-translation_patch
Report installed translation patch(es) in a tabular format.
The report displays translation patch, unique patch identifier,
language code, installed time of the translation patch and base
patch for any single row in the table.
PARAMETERS
This operation does not have any required parameters.
OPatch succeeded.
[oracle@slient ~]$ opatch lspatches -help
DESCRIPTION
List and verify patch metadata specified by patch ID (installed in
ORACLE_HOME) or patch location.
SYNTAX
opatch lspatches [-id ]
[-qfile ]
[ -bugs ]
[ -verify ]
[ -required ]
[-invPtrLoc ]
[-jre ]
[-oh ]
[ ]
OPTIONS
-id
This option specifies the patch number. It must be registered
in the Oracle Home inventory. It can be any numeric sequence or
combined with language. Ex. 11111, 11111/zh_CN. It can't support
multiple patch IDs.
-qfile
Specify the relative path to Oracle Home of the file to determine
the latest patch that touches this file.
Ex. On Linux: admin/rdbms/catcpu.sql
On Windows: admin\rdbms\catcpu.sql
OPatch can tell which latest patch touches the file catcpu.sql
in Oracle Home.
-bugs
Print bugs info for every patch.
-verify
This option would verify if the specified patch ID or patch
location is registered in Oracle Home inventory or not. Besides,
it will verify if all patch files are ok in $ORACLE_HOME.
This option should be accompanied by either option -id
or .
Ex. opatch lspatches -id 111 -verify
opatch lspatches /scratch/test/111 -verify
-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
or .
-invPtrLoc
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 Oracle Home
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
[oracle@slient ~]$
[oracle@slient ~]$ opatch napply -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation is used to Apply a set of patches at a time.
Use -silent to apply the patches in silent mode.
SYNTAX
opatch napply [patch_location] [-id comma-separated list of patch IDs]
[ -all_nodes ]
[-connectString ]
[-delay ] [ -force ] [ -force_conflict ]
[-idFile <path of="" the="" file="" that="" has="" list="" patch="" ids="" ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [ -local ]
[ -local_node ]
[-minimize_downtime ] [-no_bug_superset ]
[-no_inventory ] [-no_relink]
[-no_sysmod] [-ocmrf ]
[-oh ]
[ -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 ]
[ -property_file ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[ -remote_nodes ]
[-retry ] [-runSql] [-silent ]
[-skip_subset] [-skip_duplicate]
[-sqlScript ] [-verbose ]
OPTIONS
-all_nodes
Apply the patch using all-node mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this options tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-force
This option is meaningful with 'silent' option and is used
to override the behavior of silent under specific
circumstances.
-force_conflict
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.
-id
Use '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
/.
-idFile
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
/.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. The parameters will be common parameters
which will be passed to init scripts of all patches being
applied. This option should be ended by option
'opatch_init_end'.
-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 Oracle Home.
-local
Patch the local node, then update inventory of the
local node. Do not propagate the patch or inventory
update to other nodes.
-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.
-minimize_downtime
Only applied to RAC instances. User supplies the
order of nodes to be patched. This option cannot be
used in conjunction with -local option with a rolling
patch.
-no_bug_superset
This option tells OPatch to error out if the current
patch's bugs-to-fix is a super-set (or same set) of an
installed patch's bugs-fixed in the Oracle Home.
-no_inventory
Bypass the inventory for reading and updates.
-no_relink
The nolink option does not perform any make operations.
This option can be used during multiple patch.
applications and perform the linking step only once.
OPatch does not keep track of the make operations it
did not perform. It is the job of the OPatch users to
make sure the execute OPatch without this option at
the end, so that compilation happens once.
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts.
-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 Oracle Home doesn't have
OCM installed and configured.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME.
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-phBaseDir
Used to specify a directory containing patch directories (or)
zip files.
-phBaseFile
If is not specified, 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.
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-post
This option is used to pass parameters to the post script.
This script is executed after application 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 applied.
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 application 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
applied. This option should be ended by option
'opatch_pre_end'.
-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.
-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.
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces.
-report
Just prints out the actions without executing.
-retry
This option tells OPatch how many times it should retry
in case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction.
-skip_duplicate
This 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
This skips patches to be applied that are subset 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.
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen as
well as to the log file.
Example:
'opatch napply ' to apply all patches under
directory
'opatch napply -id 1,2,3' to apply patches
1, 2, and 3 which are present under
directory
'opatch napply -skip_subset -skip_duplicate'
to apply all patches under directory.
OPatch will skip duplicate patches and subset patches
(patches under that are subsets of patches
installed in the Oracle Home)
'opatch napply -id 1,2,3 -skip_subset -skip_duplicate'
to apply patches 1, 2, and 3 which are under
diretory. OPatch will skip duplicate patches and subset patches
(patches under that are subsets of patches
installed in the Oracle Home)
'opatch napply -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 -id 1/fr,2/de' to apply patches 1 (french
patch), 1 (german patch) which are present in the directory.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch nrollback -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation is used to Rollback a set of patches at a time.
Use -silent to Rollback the patches in silent mode.
SYNTAX
opatch nrollback -id
[ -all_nodes ]
[-connectString ]
[-delay ] -id
[-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 ]
[-jre ] [-local]
[-local_node ]
[-no_inventory] [-no_relink] [-no_sysmod]
[-oh ]
[-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 ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry ] [-runSql] [-silent]
[-sqlScript ] [-verbose]
OPTIONS
-all_nodes
Rollback the patch using all-nodes mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-id
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. A comma
separated list of patches to be rolled back must be given.
For translation patches, the patch id should be of the
format / (ex: 1234/fr)
-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 /.
This option cannot to be in conjunction with 'id' option.
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. The parameters will be common parameters which
will be passed to init scripts of all patches being rolled back.
This option should be ended by option 'opatch_init_end'.
-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 Oracle Home.
-local
Roll back then update inventory of the local node.
Do not propagate the patch or inventory update to other
nodes.
-local_node
This option can be used to specify to OPatch the local
node name to be used for RAC mode rollback of the patch.
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
NOTE: -phBaseDir or -phBaseFile has to be used to
specify the patch location(s).
-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.
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts.
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME.
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-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'.
-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.
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode rollback of
the patch. The node names are comma separated and
without spaces.
-report
Just prints out the actions, without executing.
-retry
This option tells OPatch how many times should retry in
case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction and defaults any
Y|N question to Y. This option is not supported on
RAC yet.
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more OPatch output to the screen
as well as to the log file.
Example:
'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.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch rollback -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
Roll back an existing patch indicated by the reference-id.
SYNTAX
opatch rollback -id [-connectString ]
[-delay ]
[-init <parameters for="" the="" init="" script="" in="" escaped="" double
quotes> [-opatch_init_end] ]
[-invPtrLoc ]
[-jre ] [-local]
[-local_node ] [-no_inventory]
[-no_relink] [-no_sysmod]
[-oh ] [-ph ]
[-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 ]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-remote_nodes ]
[-retry ] [-runSql] [-silent]
[-sqlScript ] [-verbose]
[all_subpatches]
OPTIONS
-all_nodes
Roll back the patch using all-nodes mode.
-connectString
This option can be used to specify the list of database
instances on which the patch needs to be applied. 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.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to
patch just the local node, provide the node name as
empty string.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-id
Use 'lsinventory' option to display all patch id's.
Each one-off patch is indicated by its id. To roll back
a patch the id for that patch must be supplied. For
translation patches, Please specify /
(ex: 1234/fr)
-init
This option is used to pass parameters to the init
script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed
in double quotes. This option should be ended by
option 'opatch_init_end'.
-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 Oracle Home.
-local
Roll back then update inventory of the local node.
Do not propagate the patch or inventory update to other
nodes
-local_node
This option can be used to specify to OPatch the local
node name to be used for RAC mode rollback of the patch
-no_inventory
This option specifies not to update the inventory, it
just updates the files in the system.
If inventory is readable, then OPatch tries to read the
inventory.
NOTE: ph has to be used to specify the patch location.
-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
-no_sysmod
This option specifies not to update the files in the
system. It just updates the inventory. It also will not
execute the pre and post scripts
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-opatch_init_end
This option is used to mark the end of init options.
Without this option everything after init till end of
the command is passed into init. This option is
meaningless without -init option.
-opatch_post_end
This option is used to mark the end of post options.
Without this option everything after post till end of
the command is passed into post. This option is
meaningless without -post option.
-opatch_pre_end
This option is used to mark the end of pre options.
Without this option everything after pre till end of
the command is passed into pre. This option is
meaningless without -pre option.
-ph
Specify the valid patch directory area. Rollback will
use the command types found in the patch directory to
identify what commands are to be used for the current
operating system
-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. 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. This option should be ended by option
'opatch_pre_end'.
-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
-ptlConnect
This option can be used to specify the connect string of the
portal schema
-ptlPassword
This option can be used to specify the password of the portal
schema
-ptlSchema
This option can be used to specify the schema of the portal
repository patch
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode rollback of
the patch. The node names are comma separated and
without spaces
-report
Just prints out the actions, without executing
-retry
This option tells OPatch how many times should retry in
case of an inventory lock failure.
-runSql
This option can be used to specify OPatch to run the
sql scripts and sql procedures if they are present in the
given patch.
-silent
This suppresses any user-interaction and defaults any
Y|N question to Y. This option is not supported on
RAC yet
-sqlScript
This option can be used to specify the custom sql script
to be run by OPatch after patching is completed
-verbose
This option prints more 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 subpatches of a composite series
in one shot.
PARAMETERS
Patch ID of the patch to be rolled back unless the command is
invoked within a patch area. For translation patches, it will
be /.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch query -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation loads and prints out various information about a patch.
Parameter patch_location points to where a patch is located.
For example, if you specify "path", there should be sub-dir.
"etc/config" under "path".
SYNTAX
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] [-get_update_components] [-has_sql]
[-is_online_patch] [-is_patchset_update]
[-is_portal_patch] [-is_rolling_patch]
[-jre ] [-oh ]
[ ]
OPTIONS
-all
Get everything available 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.
-is_translatable_patch
This option says 'true' if the patch is translatable,
'false' otherwise.
-get_base_bug
Get bugs fixed by the patch
-get_component
Get components touched by the patch.
-get_update_components
Get all components to be upgraded in a Patchset Update.
-get_date
Get patch creation date and time.
-get_os
Get platforms for which this patch could be applied.
-get_patch_type
Get the patch type.
-get_patching_model
Get the patching model.
-get_patch_language
Get the language supported by the patch.
-get_product_family
Get the product family to which the patch belongs.
-has_sql
This option says 'true' if the patch has sql related actions,
'false' otherwise.
-is_online_patch
This option says 'true' if the patch is a online patch,
'false' otherwise.
-is_patchset_update
This option says 'true' if the patch is a Patchset Update,
'false' otherwise.
-is_portal_patch
This option says 'true' if the patch has portal actions,
'false' otherwise.
-is_rolling_patch
This option says 'true' if the patch is a rolling patch,
'false' otherwise.
-jre
This option tells OPatch to use JRE (java) from the specified
location instead of the default location under Oracle Home.
-oh
The oracle home to work on. This takes precedence over the
environment variable ORACLE_HOME.
PARAMETERS
The location of the patch to be queried.
If the patch location is not specified, then the current directory
is taken as the patch location.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch version -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
Print the version of OPatch for a particular $ORACLE_HOME or display all
OPatch version in the Central Inventory.
SYNTAX
opatch version [-all] [-invPtrLoc ]
[-jre ] [-oh ]
[-v2c <5-digit version=""> -oui_loc
-ph -ohs <list of="" oracle="" homes
separated by commas]
[-help] [-h]
OPTIONS
-all
This option displays versions of OPatch(es) of all
Oracle 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 Oracle Home
-oh
The Oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-v2c
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 oracle homes
with valid version will be break up to two parts, one
is those oracle homes which have opatch version higher
or equal to the value of this option, and the other is
those with lower version
-ph
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
-ohs
List of Oracle Homes to be considered. Please provide
them separated by commas
-help (or) -h
Display valid options can be attached to this opereation
PARAMETERS
This operation does not have any required parameters.
OPatch succeeded.
[oracle@slient ~]$
[oracle@slient ~]$ opatch prereq -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation runs the prerequisite checks on an ORACLE_HOME.
SYNTAX
opatch prereq [-id ]
[-invPtrLoc ]
[-jre ] [-local_node ]
[-oh ]
[-ph ]
[-phBaseDir ]
[-phBaseFile <path to="" the="" file="" containing="" the
location of the patches to be applied>]
[-property_file ]
[-remote_nodes ]
[-sid ]
[-connectString ]
COMMANDS
CheckActiveFilesAndExecutables
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 Oracle 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.
CheckFusionAppsCompatible
Check if OUI for the Oracle Home supports patching of
Fusion applications.
CheckForCRSHomeIfRAC
Check if the given Central Inventory has a CRS Home
registered with it, if it is a RAC setup.
CheckForIdenticalPatchInOracleHome
Check if the given list of patch(es) are identical with
respect to the patch(es) installed in the Oracle Home.
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 Oracle Home
and can be skipped. This prereq 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 Oracle Home.
CheckMinimumOPatchVersion
Check if all the patches provided by the user satisfy
the requirement of minimum OPatch version for the OPatch
currently being used.
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 Oracle Home or not.
CheckPatchRollbackDependents
Check if there are any patch(es) in the Oracle 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.
CheckRACNodeList
Check if all the nodes in the RAC setup are valid, up
and reachable.
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.
CheckRollbackSid
Check if the given patch(es) can be rolled back from
the ORACLE_HOME using the given SIDs.
CheckStandAloneHome
Check if the Oracle Home is a stand-alone home or a
normal oui-based 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 Oracle Home.
CheckPatchsetUpdateCompatible
Check if the given patches and the OUI together are
Patch Set Update compatible.
CheckPatchsetUpdateComponents
Check if the components to be upgraded in the Patch Set
Update are valid.
OPTIONS
-connectString
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.
Ex: 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 rollbacked from the given OH.
-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 Oracle 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 oracle 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. Ex: /tmp/101010
-phBaseDir
This option can be used to specify the path to base dir
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.
-remote_nodes
This option can be used to specify to OPatch the list
of remote nodes to be used for RAC mode application of
the patch. The node names are comma separated and
without spaces.
-sid
This option can be used to specify the SIDs of the database
instances. This option can be used only for local system
operations.
OPatch succeeded.
[oracle@slient ~]$ opatch util -help
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
DESCRIPTION
This operation invokes the chosen utilities on an ORACLE_HOME.
SYNTAX
opatch util [ -help ] [ COMMAND ]
Use opatch util [ COMMAND ] -help to get help on a particular command.
COMMANDS
ApplySql
Apply sql, sql procedure related actions for patches, which
are already applied using Apply or NApply operation.
CheckMinimumOpatchVersion
Check if patch is compatible with the given user input version
CheckComponents
Check if the given patch is suitable for the Oracle 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.
CopyListedDirs
Recursively copy all directories listed in
ORACLE_HOME/.patch_storage//rac/copy_dirs.txt
to remote nodes.
CopyListedDirsTest
Recursively copy a single directory to remote nodes.
CopyListedFiles
Copy all files listed in
ORACLE_HOME/.patch_storage//rac/copy_files.txt
to remote nodes.
CopyListedFilesTest
Copy a single file to remote nodes.
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.
InstallOCM
Install and configure OCM.
IsShared
Returns true if running on shared environment, else it returns
false.
LoadXML
Prompt for path/name of the XML file, then check if the
XML is correct.
RemoveListedDirs
Recursively remote directories listed in
ORACLE_HOME/.patch_storage//rac/remove_dirs.txt
on remote nodes.
RemoveListedDirsTest
Recursively remove a directory on remote nodes.
RemoveListedFiles
Remove files listed in
ORACLE_HOME/.patch_storage//rac/remove_files.txt
on remote nodes.
RemoveListedFilesTest
Remove a single file on remote nodes.
RestoreOH
Restore the OracleHome to the previous state.
RollbackSql
Rollback sql, sql procedure related actions for patches, which
are already rolled back using Rollback or NRollback operation.
RunAnyCommand
Run any command on remote nodes.
RunLocalMake
Invoke re-link on the local node. Commands are stored in
ORACLE_HOME/.patch_storage//make.txt.
RunRemoteMake
Invoke re-link on remote nodes. Commands are stored in
ORACLE_HOME/.patch_storage//rac/make_cmds.txt.
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/oplan/configData.xml
UpdateRemoteNodes
Propagate/Remove files/directories to/on remote nodes
using files under ORACLE_HOME/.patch_storage//rac/*.
UpdateOPatchVersion
Update the version of OPatch in the inventory of
Oracle 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'
OPatch succeeded.
[oracle@slient ~]$
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2144913/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Curl 命令引數解析
- Python命令列引數解析模組argparsePython命令列
- Linux命令引數詳細解析-mvLinux
- Linux命令引數詳細解析-cpLinux
- Linux命令引數詳細解析-vimLinux
- 命令列引數解析模組argparse的使用命令列
- Oracle引數檔案解析——引數解析Oracle
- Shell解析引數
- Python中最好用的命令列引數解析工具Python命令列
- jbock:無反射的Java命令列引數解析器反射Java命令列
- linux 中解析命令列引數 (getopt_long用法)Linux命令列
- tasklist命令 引數
- opatch命令報錯Inventory is corrupted
- 命令列引數解析函式getopt_long() 使用詳解命令列函式
- CNN模型引數解析CNN模型
- js解析url引數JS
- canvas transform引數解析CanvasORM
- 解析型別引數型別
- ThreadPoolExecutor 引數解析thread
- ogg引數解析
- JavaScript解析URL引數JavaScript
- tcpdump命令常用引數TCP
- arp命令 引數
- 使用 Python 解析引數Python
- Hystrix 配置引數全解析
- AWR Execute to Parse引數解析
- linux的命令列解析引數之getopt_long函式使用Linux命令列函式
- tar命令引數詳解
- Logstash 命令列引數命令列
- 命令列引數 opencv呼叫命令列OpenCV
- postconf 命令常用引數
- vi 替換命令引數
- Go 接收命令列引數Go命令列
- ipconfig命令引數
- lsblk命令引數詳解
- 做ftp專案中使用命令列引數及 ----python 命令列 解析模組 optparseFTP命令列Python
- 【AIX 命令學習】lsvg 命令引數使用!AISVG
- Oracle引數檔案解析——引數檔案分析獲取Oracle