大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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
:
:# 2. Rollback the patch.
:     This rolls back the patch from all the applicable homes on the machine
:
: opatch auto -rollback
:
:# 3. apply the patch with -oh option
:     This option allows to apply patch on selective list of oracle homes
:
: opatch auto -oh /ora/oh2,/ora/oh3,/ora/oh4
:
:# 4. apply the patch with -och option
:     This option is used to only patch the CRS home when
:     Clusterware stack is down.
:
: opatch auto -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
               quotes> [-opatch_init_end] ]
              [-invPtrLoc ]
              [-jre ] [-local ] [-local_node ]
              [-minimize_downtime ] [-no_bug_superset ] [-no_inventory ]
              [-no_relink] [-no_sysmod] [-ocmrf ]
              [-oh ]
              [-post
               quotes> [-opatch_post_end] ]
              [-pre
               in escaped double quotes> [-opatch_pre_end] ]
              [-profile_mask ]
              [-property_file ]
              [-ptlConnect ]
              [-ptlPassword ]
              [-ptlSchema ]
              [-remote_nodes ]
              [-retry
              [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
                      [-init
                       quotes> [-opatch_init_end] ]
                      [-invPtrLoc ]
                      [-jre ] [ -local ]
                      [ -local_node ]
                      [-minimize_downtime ] [-no_bug_superset ]
                      [-no_inventory ] [-no_relink]
                      [-no_sysmod]  [-ocmrf ]
                      [-oh ]
                      [ -phBaseDir
                        of patch directories> ]
                      [ -phBaseFile
                        location of the patches to be applied> ]
                      [-post
                       escaped double quotes> [-opatch_post_end] ]
                      [-pre
                       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
   &nb
文章标题:opatch命令参数解析
文章源于:http://dzwzjz.com/article/ppehcc.html