B OPatchAuto Syntax and Commands

This appendix provides a comprehensive listing and description of all OPatchAuto commands.

Note:

OPatchAuto commands must be run from the GI Home.

B.1 OPatchAuto Commands

The OPatchAuto commands are run from the product home out of the standard OPatch directory.

Example:

$PRODUCT_HOME/OPatch/opatchauto apply <PATH_TO_PATCH_DIRECTORY>

where <PATH_TO_PATCH_DIRECTORY> is the full path to local staging area where you have downloaded your patches.

OPatchAuto consists of four primary commands:

And one global argument:

B.1.1 apply

Apply a System Patch to a product home. User specified the patch location or the current directory will be taken as the patch location.

Important: OPatchAuto must be run from the product home as a root user.

Syntax

opatchauto apply  <patch-location> 
        [ -phBaseDir <patch.base.directory> ] 
        [ -oh <home> ] 
        [ -log <log> ] 
        [ -logLevel <log_priority> ] 
        [ -binary ] 
        [ -analyze ]                     
        [ -invPtrLoc <inventory.pointer.location> ]                     
        [ -host <host> ] 
        [ -wallet <wallet> ]                     
        [ -rolling ] 
        [ -database <database> ] 
        [ -generatesteps ] 
        [ -norestart ] 
        [ -ocmrf ocmrf> ] 
        [ -sdb ] 
       [ -shardgroup <shardgroup.name> ]       [ -shardspace <shardspace.name> ]       [ -dg <dataguard.name> ]
        [ -remote ] 
        [ -nonrolling ]

Parameters

patch-location: The patch location.

Options

The following table describes the options available for the apply command.

Table B-1 apply Command Options

Option Description

phBaseDir

The location of base patch directory.

oh

The location of the oracle home.

log

The log location.

logLevel

The log level (defaults to "INFO").

Supported values: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF

binary

Forces execution of -phases offline:binary-patching.

analyze

If this option is selected, the environment will be analyzed for suitability of the patch on each home without affecting the home. The patch will not be applied or rolled back and targets will not be shut down.

invPtrLoc

The central inventory pointer file location.

host

The remote host or host:port.

wallet

The location of the wallet file.

rolling

Enables sharded database (sdb) rolling mode where database(s) are patched one after the other.

database

List of databases to be patched.

generatesteps

Enables generation of steps.

norestart

The no restart option during execution.

ocmrf

Location of the Oracle Configuration Manager response file (ocmrf).

sdb

To signify patching sharded database.

For more information, run opatchauto <apply|rollback> -sdb -help to get more help on patching a sharded database.

shardgroup

This is used to restrict patching to databases of the selected shard group.

shardspace

This is used to restrict patching to databases of the selected shard pace.

dg

This is used to restrict patching to databases of the selected DataGuard. All the standby databases of the DataGuard are patched first, followed by its primary database.

remote

Enables remote node patching. This is supported only for Grid setup and it should be up and running.

nonrolling

Enables non-rolling mode.

force_conflict If a conflict exist which prevents the patch from being applied, the -force_conflict flag can be used to force application of the patch. OPatch will remove all the conflicting patches before applying the current patch. It is applicable to only apply operation.

Notes:

If opatchauto apply is run and encounters an individual patch within a patch set that cannot be installed, that patch will be skipped and OPatchAuto will continue with the installation of the next patch in the sequence.

If opatchauto apply is run and encounters an individual patch that is identical (same patch ID and Unique Patch Identifier (UPI)) to a patch already installed in the product home, OPatchAuto perform the following based on specific patch conditions:

  • If the individual patch was created later than the product home patch, OPatchAuto installs the individual patch.

  • If the individual patch's creation date is the same as the product home patch, OPatchAuto will skip installing the individual patch.

  • If the individual patch was created before the product home patch, an error will be generated.

This analyze option simulates an OPatchAuto apply session by running all prerequisite checks, when possible, without making changes to the system (either bits or configurations). Because the analyze command does not modify the system, it will perform the following checks:

  • Run SQL sync in analyze mode.

  • Validate all pre and post processing steps making sure the command is present and executable.

B.1.2 resume

This operation resumes a previous patching session.

Important: OPatchAuto must be run from the GI Home as a root user.

Syntax

opatchauto resume [ -log <log> ] [ -logLevel <log_priority> ]
     [ -password <password> ]
     [ -walletPassword <wallet.password> ]
     [ -session <session> ]

Options

The following table describes the options available for the resume command.

Table B-2 resume Command Options

Option Description

log

The log location.

logLevel

The log level (defaults to "INFO").

B.1.3 rollback

This operation rolls back a patch.

Important: OPatchAuto must be run from the product home as a root user.

Syntax

opatchauto rollback [ <patch-location> ] 
        [ -phBaseDir <patch.base.directory> ]                     
        [ -oh <home> ] 
        [ -log <log> ] 
        [ -logLevel <log_priority> ] 
        [ -binary ] 
        [ -analyze ]                        
        [ -invPtrLoc <inventory.pointer.location> ]                        
        [ -host <host> ] 
        [ -wallet <wallet> ]                       
        [ -rolling ] 
        [ -database <database> ]               
        [ -generatesteps ] 
        [ -norestart ] 
        [ -sdb ]        
        [ -remote ] 
        [ -nonrolling ]

Parameters

patch-location: The patch location.

Options

The following table describes the options available for the rollback command.

Table B-3 rollback Command Options

Option Description

phBaseDir

The location of base patch directory.

oh

The location of the oracle home.

log

The log location.

logLevel

The log level (defaults to "INFO").

Supported values: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF

binary

Forces execution of -phases offline:binary-patching.

analyze

If this option is selected, the environment will be analyzed for suitability of the patch on each home without affecting the home. The patch will not be applied or rolled back and targets will not be shut down.

invPtrLoc

The central inventory pointer file location.

host

The remote host or host:port.

wallet

The location of the wallet file.

rolling

Enables sharded database (sdb) rolling mode where database(s) are patched one after the other.

database

List of databases to be patched.

generatesteps

Enables generation of steps.

norestart

The no restart option during execution.

sdb

To signify patching sharded database.

For more information, run opatchauto <apply|rollback> -sdb -help to get more help on patching a sharded database.

remote

Enables remote node patching. This is supported only for Grid setup and it should be up and running.

nonrolling

Enables non-rolling mode.

B.1.4 help

You can view online help for any command by specifying the -help or -h option.

For example:

opatchauto -help
opatchauto -version
opatchauto apply -help
opatchauto resume -help
opatchauto rollback -help
 

B.1.5 version

Print the version of the OPatch utility, dependent OPlan version, and the osysmodel version.

Important: OPatchAuto must be run from the GI Home as a root user.

Syntax

<GI_HOME>OPatch/opatchauto version