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:
-
patchid
identifies the patch to be applied.Note:
For details about how to find the available patch identifiers, see Listing Available Patches. -
--instance1
specifies 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
--dbnames
argument, then all of the databases that share the specified Oracle Home are patched. After the operation, the Oracle Home directory location remains unchanged; however, the patch level information embedded in the Oracle Home name is adjusted to reflect the patching operation. -
--dbnames
specifies the database names for the databases that are the target of the patching operation.If you use this argument to patch a database that uses 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 database is moved to the new Oracle Home. -
-alldbs
patches all of the databases that share the same Oracle Database binaries (Oracle Home) as the databases specified in the--dbnames
argument.After the operation, the Oracle Home directory location remains unchanged; however, the patch level information embedded in the Oracle Home name is adjusted to reflect the patching operation.
-
--run_datasql
controls execution of the SQL commands associated with the patch:-
--run_datasql 1
executes the SQL commands associated with the patch. -
--run_datasql 0
does 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
.Note:
-
Patch-related SQL should only be executed after all of the compute nodes are patched. Ensure that you specify
--run_datasql 0
if 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.sql
script for Oracle Database 11g or thedatapatch
utility for Oracle Database 12c, or later. Refer to the patch documentation for full details.
-