dbaascli patch db apply
patch db apply subcommand of the
dbaascli utility is used to apply an Oracle Database or Oracle Grid Infrastructure
patch.
Connect to a compute node as the opc user and run the
command as the root user.
-
To apply a patch to specific instances, use the following command:
# dbaascli patch db apply --patchid patchid --instance1 hostname:oracle_home [--dbnames dbname[,dbname2 ...]] [--run_datasql (0|1)] -
To apply a patch by specifying only database names, use the following command:
# dbaascli patch db apply --patchid patchid --dbnames dbname[,dbname2 ...] [--run_datasql (0|1)] [-alldbs]
In the preceding commands:
-
patchididentifies the patch to be applied.Note:
For details about how to find the available patch identifiers, see Listing Available Patches. -
--instance1specifies a compute node and Oracle Home directory that is subject to the patching operation. In this context, an Oracle Home directory may be an Oracle Database home directory or the Oracle Grid Infrastructure home directory.If you use this argument to specify a shared Oracle Home directory and you do not specify the
--dbnamesargument, then all of the databases that share the specified Oracle Home are patched. -
--dbnamesspecifies the database names for the databases that are the target of the patching operation.If you use this option to patch a database that uses a shared Oracle Home, and you do not specify the
-alldbsoption, then the database is moved to another Oracle Home that contains the patched Oracle Database binaries. -
-alldbspatches all of the databases that share the same Oracle Database binaries (Oracle Home) as the databases specified in the--dbnamesargument. -
--run_datasqlcontrols execution of the SQL commands associated with the patch:-
--run_datasql 1executes the SQL commands associated with the patch. -
--run_datasql 0does not execute the SQL commands associated with the patch.
If the argument is not specified, the patch-related SQL is executed by default; equivalent to
--run_datasql 1.Patch-related SQL should only be executed after all of the compute nodes are patched. Ensure that you specify
--run_datasql 0if you are patching a node and further nodes remain to be patched.This argument can only be specified along with a patching operation on a compute node. If you have patched all of your nodes and you did not specify this argument, you need to manually execute the SQL commands associated with the patch, which typically involves running the
catbundle.sqlscript for Oracle Database 11g or thedatapatchutility for Oracle Database 12c, or later. Refer to the patch documentation for full details. -
Note:
To save time and storage space, the patching operation may move a database to another Oracle Home that already contains the patched Oracle Database binaries.