The exadbcpatchmulti Command

You can use the exadbcpatchmulti utility to perform assisted patching operations for Oracle Grid Infrastructure and Oracle Database on Exadata Cloud at Customer. The exadbcpatchmulti utility is located under /var/opt/oracle/exapatch on every compute node.

Note:

  • The exadbcpatchmulti command requires root administration privileges. Therefore, you need to connect to the compute node as the opc user and then start a root-user command shell to perform patching operations.

  • The exadbcpatchmulti command uses the cloud-specific tooling included on your Exadata Cloud at Customer compute nodes, and specific patches may require functionality provided by a specific version of the tools. Therefore, it is recommended to update to the latest version of the cloud tools before performing any patching operations. See Updating the Cloud Tooling on Exadata Cloud at Customer.

  • The exadbcpatchmulti command only works along with patches for Oracle Grid Infrastructure and Oracle Database. It cannot be used along with operating system patches.

  • Each exadbcpatchmulti action also has an equivalent action that is available by using the dbaascli command. The dbaascli command variants are provided separately in this document.

The syntax for the exadbcpatchmulti command depends on the action being performed, which is specified as the first argument to the command. The following list outlines the available patching actions and the syntax of the exadbcpatchmulti command for each action. Detailed procedures and examples for each action are provided separately in this document.

  • To list the available patch identifiers for an Oracle Home directory:

    # /var/opt/oracle/exapatch/exadbcpatchmulti -list_patches 
    -oh=hostname:oracle_home [-sshkey=sshkey_file]
  • To check prerequisites before applying a patch:

    • On specific instances:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -precheck_async patchid 
      -instance1=hostname1:oracle_home 
      [-instance2=hostname2:oracle_home ...] 
      [-dbnames=dbname[,dbname2 ...]] [-sshkey=sshkey_file]
    • By specifying only database names:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -precheck_async patchid 
      -dbnames=dbname[,dbname2 ...] [-alldbs] [-sshkey=sshkey_file]
  • To apply a patch:

    • On specific instances:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -apply_async patchid 
      -instance1=hostname1:oracle_home
      [-instance2=hostname2:oracle_home ...] 
      [-dbnames=dbname[,dbname2 ...]] [-run_datasql=(0|1)] [-sshkey=sshkey_file]
    • By specifying only database names:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -apply_async patchid 
      -dbnames=dbname[,dbname2 ...] [-run_datasql=(0|1)] [-alldbs] [-sshkey=sshkey_file]
  • To report the status of a patching operation for an Oracle Home directory:

    # /var/opt/oracle/exapatch/exadbcpatchmulti -get_status patchtxn 
    -oh=hostname:oracle_home [-sshkey=sshkey_file] 
  • To roll back a previously applied patch or a failed patch:

    • On specific instances:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -rollback_async patchid 
      -instance1=hostname1:oracle_home 
      [-instance2=hostname2:oracle_home ...] 
      [-dbnames=dbname[,dbname2 ...]] [-run_datasql=(0|1)] [-sshkey=sshkey_file]
    • By specifying only database names:

      # /var/opt/oracle/exapatch/exadbcpatchmulti -rollback_async patchid 
      -dbnames=dbname[,dbname2 ...] [-run_datasql=(0|1)] [-alldbs] [-sshkey=sshkey_file]

The following table describes the arguments shown in the syntax for the exadbcpatchmulti command.

Argument Description

patchid

Identifies the patch to be pre-checked, applied, or rolled back.

To list the applicable patch identifiers for an Oracle Home directory, execute the exadbcpatchmulti command with the -list_patches action.

-instanceN = hostname:oracle_home

Specifies a compute node and Oracle Home directory that is the target of the specified patching action. In this context, an Oracle Home directory may be an Oracle Database home directory or the Oracle Grid Infrastructure home directory.

If you specify this option, then you explicitly identify the nodes and Oracle Home directory locations that you want to patch. You can patch all of your nodes using one command or you may patch some nodes in one run and patch the rest later.

If you use this argument to specify a shared Oracle Home directory and you do not specify the -dbnames argument, then the patching action is applied to all of the databases that share the specified Oracle Home.

-dbnames = dbname[,dbname2 ...]

Specifies the database names for the databases that are the target of the specified patching action.

If you use this argument to patch databases that use a shared Oracle Home and you do not specify the -alldbs option, then a new Oracle Home containing the patched Oracle Database binaries is created and the databases are moved to the new Oracle Home.

-alldbs

Specifies that you want to apply the specified patching operation to all of the databases that share the same Oracle Database binaries (Oracle Home) as the databases specified in the -dbnames argument.

-run_datasql = (0|1)

Use this argument to control execution of the SQL commands associated with the patch or rollback operation:

  • -run_datasql=1 executes the SQL commands associated with the patch or rollback operation.

  • -run_datasql=0 does not execute the SQL commands associated with the patch or rollback operation.

If the argument is not specified, the patch-related SQL is executed by default; equivalent to -run_datasql=1.

The SQL commands associated with a patch should only be performed after all of the compute nodes are patched or rolled back. Ensure that you specify -run_datasql=0 if you are patching, or rolling back, a subset of nodes and further nodes remain to be patched or rolled back.

This argument can only be specified along with a patching or rollback operation acting on a set of compute nodes. If you have patched, or rolled back, all of your nodes and you did not specify this argument, you need to manually execute the SQL commands associated with the patch or rollback operation, which typically involves running the catbundle.sql script for Oracle Database 11g or the datapatch utility for Oracle Database 12c, or later. Refer to the patch documentation for full details.

-oh = hostname:oracle_home

Specifies the compute node and Oracle Home directory location that is used to search for applicable patches or to report on the current status of a patching operation. In this context, an Oracle Home directory may be an Oracle Database home directory or the Oracle Grid Infrastructure home directory.

-sshkey = sshkey_file

Specifies an SSH private key associated with the opc user, which is used to connect to compute nodes in the cluster.

Typically this file is located at /home/opc/.ssh/id_rsa.

patchtxn

This argument is only used to report the status of a patching operation for an Oracle Home directory. It specifies the identifier for the patching operation under investigation.

The identifier is output to the terminal and also recorded in the log file shortly after the commencement of a pre-check, patch, or rollback operation.

When you run the exadbcpatchmulti command, its activity is recorded in the log file at /var/opt/oracle/log/exadbcpatch/exadbcpatch.log. Log files for previous patching operations are maintained in the same directory and each log file contains a timestamp within its name.