Grid Infrastructure Management

This section focuses on managing Oracle Grid Infrastructure, which supports clustering and high availability. Key tasks include configuring a Grid Infrastructure home (dbaascli gridHome create), upgrading the Grid Infrastructure (dbaascli grid upgrade), and managing TCPS (Transport Layer Security) certificates by configuring (dbaascli grid configureTCPS), removing (dbaascli grid removeTCPSCert), or rotating them (dbaascli grid rotateTCPSCert). These commands ensure efficient setup, maintenance, and security of the Grid Infrastructure.

dbaascli gridHome create

To configure Grid Infrastructure home, use the dbaascli gridHome create command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli gridHome create --version value [--resume [--sessionID value]] [--waitForCompletion value]

Parameters:

Parameter Description
--version specifies the Grid home version
--resume resumes the previous run
--sessionID specifies to resume a specific session ID
--waitForCompletion specifies false to run the operation in the background. Valid values: true or false

Frequently Asked Questions:

Q: What is the purpose of the dbaascli gridHome create command?

A: The dbaascli gridHome create command is used to configure a Grid Infrastructure home for Oracle Grid infrastructure in an Oracle Base Database Cloud@Customer environment.

Q: What is the prerequisite for running the dbaascli gridHome create command?

A: The command must be run as the root user.

Q: How do I specify the version of Grid Infrastructure home to be created?

A: Use the --version option to specify the Grid home version. This is a mandatory option when creating the Grid home.

Q: Can I resume a previous dbaascli gridHome create session?

A: Yes, you can use the --resume option to resume a previous session. Optionally, you can specify the session ID using the --sessionID option to resume a specific session.

Q: What does the –resume option do in the dbaascli gridHome create command?

A: The --resume option allows you to resume a previously interrupted or incomplete operation.

Q: How do I run the operation in the background?

A: You can set the --waitForCompletion option to false to run the operation in the background. The valid values for this option are true (default) or false.

Q: What is the default behavior if –waitForCompletion is not specified?

A: If --waitForCompletion is not specified, the operation will run in the foreground, and the command will wait for the operation to complete before returning control to the user.

Q: What is the purpose of the –sessionID option?

A: The --sessionID option is used to specify the ID of a previous session that you want to resume, in case of an incomplete or interrupted operation.

Q: Can I use the dbaascli gridHome create command to upgrade an existing Grid home?

A: No, this command is used specifically for configuring a new Grid Infrastructure home, not for upgrading an existing one.

Q: What is an example command to create a Grid home with version 19.9.0.0.0?

A: Here’s an example command:

dbaascli gridHome create --version 19.9.0.0.0

Q: What should I do if the dbaascli gridHome create command is interrupted?

A: You can resume the operation by using the --resume option. If you have the session ID, you can provide it using the --sessionID option to resume a specific session.

Q: Can I specify the –resume option without a session ID?

A: Yes, you can use the --resume option without specifying a session ID. In this case, the system will attempt to resume the most recent session.

Q: What happens if I specify –waitForCompletion false?

A: If you specify --waitForCompletion false, the operation will run in the background, allowing you to continue using the command line while the operation completes.

Q: Is it possible to track the progress of a background operation?

A: The dbaascli command does not provide a direct way to track background operations. You may need to check system logs or the session status manually.

Q: Can I specify an invalid Grid home version when creating it?

A: No, the --version option must contain a valid Grid Infrastructure version. If an invalid version is provided, the command will return an error.

Q: How can I determine the Grid home version to use for creation?

A: You can refer to Oracle’s documentation or consult with your database administrator to determine the correct Grid home version to use for your environment.

Q: What should I verify before running the dbaascli gridHome create command?

A: Ensure that you are logged in as the root user and that the version you want to use for Grid Infrastructure is compatible with your environment.

dbaascli grid configureTCPS

To configure TCPS for the existing cluster, use the dbaascli grid configureTCPS command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli grid configureTCPS
[--pkcs12WalletFilePath]
[--caCertChain]
[--precheckOnly]
[--serverCert]
[--privateKey]
[--certType]
[--privateKeyPasswordProtected]

Parameters:

Parameter Description
--pkcs12WalletFilePath specifies the absolute path of the certificate file, which is in the pkcs12 wallet format
--caCertChain concatenated list of certs, containing intermediate CA’s and root CA certs
--precheckOnly specifies yes to run only the prechecks for this operation. Valid values: yes or no.
--serverCert specifies the path of PEM certificate to use or rotate for TCPS configuration.
--privateKey specifies the path of the private key file of the certificate.
--certType type of the cert to be added to the Grid Infrastructure wallet. Accepted values are: SELF_SIGNED_CERT, CA_SIGNED_CERT, or PKCS12_CERT. Default: SELF_SIGNED_CERT
--privateKeyPasswordProtected specifies if the private key is password protected or not. Valid values: true or false. Default: true.

TCPS Configuration for Oracle Base Database Cloud@Customer:

TCPS behavior differs based on the Oracle Base Database Cloud@Customer deployment type:

For Oracle Database 19c and later, TCPS is enabled by default for newly provisioned databases. Existing databases that were provisioned before this behavior was introduced might not have TCPS enabled.

To enable TCPS for an existing database, update the database-specific sqlnet.ora file on all database nodes by adding the WALLET_LOCATION parameter as follows:

WALLET_LOCATION = (SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/var/opt/oracle/dbaas_acfs/grid/tcps_wallets)))

After updating the sqlnet.ora file on all database nodes, restart the database to enable TCPS.

Enabling TCPS may affect Oracle Zero Data Loss Recovery Appliance (ZDLRA) connectivity if the database is not configured to use the WALLET_ROOT parameter. Before enabling TCPS, verify that the following prerequisites are met:

  1. The database is running Oracle Database Release Update 19.17 or later.

  2. The database is configured to use the WALLET_ROOT parameter.

  3. If the database is configured for ZDLRA backups, verify that the RMAN channel configuration references RA_WALLET under WALLET_ROOT/server_seps.

For example:

  1. Connect to RMAN.

  2. Run the following command:

    SHOW CHANNEL;
  3. Verify that the output contains an RA_WALLET entry similar to the following:

    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%I_%U_%T_%t' PARMS "SBT_LIBRARY=/u02/app/oracle/product/19.0.0.0/dbhome_1/lib/libra.so, ENV=(RA_WALLET='location=file:/var/opt/oracle/dbaas_acfs/dbrs19c/wallet_root/server_seps credential_alias=DBRS')";

    In this example, the RA_WALLET location points to WALLET_ROOT/server_seps, which is compatible with TCPS.

Frequently Asked Questions:

Q: What is the purpose of the dbaascli grid configureTCPS command?

A: The dbaascli grid configureTCPS command is used to configure Transport Layer Security (TCPS) for the existing cluster in an Oracle Base Database Cloud@Customer environment.

Q: What is the prerequisite for running the dbaascli grid configureTCPS command?

A: The command must be run as the root user.

Q: Is TCPS enabled by default on Oracle Base Database Cloud@Customer systems?

A: No, TCPS is not enabled by default on Oracle Base Database Cloud@Customer systems. To enable TCPS, you need to update the sqlnet.ora file for the specific database and restart the database.

Q: What is the consequence of enabling TCPS on Oracle Base Database Cloud@Customer systems?

A: Enabling TCPS on Oracle Base Database Cloud@Customer systems will cause Zero Data Loss Recovery Appliance (ZDLRA) connections to fail. You can only enable either ZDLRA or TCPS configuration, but not both simultaneously.

Q: What does the –pkcs12WalletFilePath option specify?

A: The --pkcs12WalletFilePath option specifies the absolute path to the certificate file in the PKCS12 wallet format, which is used for TCPS configuration.

Q: What is the –caCertChain option used for?

A: The --caCertChain option specifies a concatenated list of certificates containing intermediate CA certificates and the root CA certificate.

Q: What does the –precheckOnly option do?

A: The --precheckOnly option specifies whether to run only the prechecks for the TCPS configuration operation. Accepted values are yes or no.

Q: What does the –serverCert option specify?

A: The --serverCert option specifies the path to the PEM certificate that will be used or rotated for the TCPS configuration.

Q: How do I specify the private key for TCPS configuration?

A: Use the --privateKey option to specify the path to the private key file associated with the server certificate.

Q: What are the accepted values for the –certType option?

A: The accepted values for the --certType option are:

The default value is SELF_SIGNED_CERT.

Q: Is the private key password protected by default?

A: Yes, the --privateKeyPasswordProtected option is set to true by default, indicating that the private key is password protected. You can set it to false if the private key is not password protected.

Q: Can I run a precheck before configuring TCPS?

A: Yes, you can run only the prechecks for the operation by setting the --precheckOnly option to yes. This helps to validate the environment before making changes.

Q: What happens if I provide an incorrect path for the PKCS12 wallet file?

A: If the --pkcs12WalletFilePath contains an incorrect path, the command will fail, and the TCPS configuration will not proceed.

Q: What should I do if the private key is password protected?

A: If the private key is password protected, ensure that the --privateKeyPasswordProtected option is set to true (which is the default).

Q: Can I specify my own CA-signed certificate for TCPS configuration?

A: Yes, you can specify your own CA-signed certificate by using the --serverCert and --privateKey options, and by setting the --certType to CA_SIGNED_CERT.

Q: What is an example command to configure TCPS using a self-signed certificate?

A: Here’s an example:

dbaascli grid configureTCPS --serverCert /path/to/self_signed_cert.pem --privateKey /path/to/private_key.pem --certType SELF_SIGNED_CERT

Q: Can I use a PKCS12 certificate for TCPS configuration?

A: Yes, you can use a PKCS12 certificate by specifying the --pkcs12WalletFilePath option and setting the --certType to PKCS12_CERT.

Q: What should I verify before running the dbaascli grid configureTCPS command?

A: Verify that you have the valid certificate files, private key files, and that you are logged in as the root user. Also, ensure you understand the implications if you’re using ZDLRA as it cannot run simultaneously with TCPS.

Example: dbaascli grid configureTCPS

To configure grid using self-signed certificate:

dbaascli grid configureTCPS

To configure grid using CA-signed certificate:

dbaascli grid configureTCPS --cert_type CA_SIGNED_CERT --server_cert /tmp/certs/server_cert.pem --ca_cert_chain /tmp/certs/ca.pem --private_key /tmp/certs/encrypted_private.key --private_key_password_protected false

dbaascli grid removeTCPSCert

To remove existing TCPS certificates from Grid Infrastructure wallet, use the dbaascli grid removeTCPSCert command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli grid removeTCPSCert --subject <value>
 {
   --userCert | --trustedCert | --requestedCert
 }
 [--serialNumber <value>] [--executePrereqs] [--resume [--sessionID <value>]] [--bounceListeners]

Parameters:

Parameter Description
--subject specifies subject of the certificate
--userCert flag to indicate user certificate
--trustedCert flag to indicate trusted certificate
--requestedCert flag to indicate requested certificate
--serialNumber specifies the serial number of the certificate
--executePrereqs runs the prerequisite checks and reports the results
--resume resumes the previous run
--sessionID specifies to resume a specific session ID
--bounceListeners flag to bounce the Grid Infrastructure listener and scan listener

Frequently Asked Questions:

Q: What is the purpose of the dbaascli grid removeTCPSCert command?

A: The dbaascli grid removeTCPSCert command is used to remove existing TCPS certificates from the Grid Infrastructure wallet in an Oracle Base Database Cloud@Customer environment.

Q: What is the prerequisite for running the dbaascli grid removeTCPSCert command?

A: The command must be run as the root user.

Q: What does the –subject option specify in the dbaascli grid removeTCPSCert command?

A: The --subject option specifies the subject of the certificate to be removed from the Grid Infrastructure wallet.

Q: What is the purpose of the –userCert flag?

A: The --userCert flag indicates that the certificate to be removed is a user certificate.

Q: When should I use the –trustedCert flag?

A: Use the --trustedCert flag when removing a trusted certificate from the Grid Infrastructure wallet.

Q: What does the –requestedCert flag do?

A: The --requestedCert flag indicates that the certificate being removed is a requested certificate.

Q: What does the –serialNumber option specify?

A: The --serialNumber option specifies the serial number of the certificate to be removed. It is useful for uniquely identifying a certificate when there are multiple certificates with the same subject.

Q: What is the purpose of the –executePrereqs option?

A: The --executePrereqs option runs prerequisite checks before removing the certificate and reports the results, ensuring that the environment is properly prepared for the operation.

Q: What does the –resume option do?

A: The --resume option resumes the removal operation if it was previously interrupted.

Q: How do I specify a session ID when resuming an interrupted operation?

A: Use the --sessionID option to specify the session ID of the interrupted operation that you want to resume.

Q: What does the –bounceListeners flag do?

A: The --bounceListeners flag is used to restart the Grid Infrastructure listener and scan listener after the TCPS certificate is removed.

Q: Can I remove a TCPS certificate without bouncing the listeners?

A: Yes, the --bounceListeners flag is optional. If you don’t specify it, the listeners will not be bounced automatically.

Q: How can I ensure that the operation will run safely?

A: You can use the --executePrereqs option to perform prerequisite checks before running the command, ensuring that everything is in order before the removal process.

Q: What should I do if I need to remove a specific user certificate by serial number?

A: Use the --subject option to specify the certificate’s subject, the --userCert flag to indicate that it is a user certificate, and the --serialNumber option to specify the certificate’s serial number.

Q: Can I remove multiple certificates at once?

A: No, the command is designed to remove a single certificate at a time based on the provided subject and other parameters.

Q: What happens if the certificate removal process is interrupted?

A: You can resume the operation using the --resume option along with the --sessionID of the interrupted process.

Q: Do I need to run the command as the root user?

A: Yes, the dbaascli grid removeTCPSCert command must be run as the root user to have the necessary privileges for removing TCPS certificates.

Q: How can I identify the certificate I want to remove?

A: You can identify the certificate by its subject, and optionally, by its serial number to ensure you’re targeting the correct certificate for removal.

Q: What is an example command to remove a trusted certificate?

A: Here’s an example:

dbaascli grid removeTCPSCert --subject "CN=example_cert" --trustedCert

dbaascli grid rotateTCPSCert

To rotate TCPS certificates, use the dbaascli grid rotateTCPSCert command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli grid rotateTCPSCert
[--pkcs12WalletFilePath]
[--caCertChain]
[--precheckOnly]
[--serverCert]
[--privateKey]
[--certType]
[--privateKeyPasswordProtected]

Parameters:

Parameter Description
--pkcs12WalletFilePath specifies the absolute path of the certificate file, which is in the pkcs12 wallet format
--caCertChain concatenated list of certs, containing intermediate CA’s and root CA certs
--precheckOnly specifies yes to run only the prechecks for this operation. Valid values: yes or no.
--serverCert specifies the path of PEM certificate to use or rotate for TCPS configuration.
--privateKey specifies the path of the private key file of the certificate.
--certType type of the cert to be added to the Grid Infrastructure wallet. Accepted values are: SELF_SIGNED_CERT, CA_SIGNED_CERT, or PKCS12_CERT. Default: SELF_SIGNED_CERT
--privateKeyPasswordProtected specifies if the private key is password protected or not. Valid values: true or false. Default: true.

Frequently Asked Questions:

Q: What is the purpose of the dbaascli grid rotateTCPSCert command?

A: The dbaascli grid rotateTCPSCert command is used to rotate TCPS (Transport Layer Security Protocol) certificates in the Grid Infrastructure wallet in Oracle Base Database Cloud@Customer environments.

Q: What is the prerequisite for running the dbaascli grid rotateTCPSCert command?

A: The command must be run as the root user.

Q: What does the –pkcs12WalletFilePath option specify?

A: The --pkcs12WalletFilePath option specifies the absolute path to the certificate file in the PKCS12 wallet format for the TCPS configuration.

Q: What is the purpose of the –caCertChain option?

A: The --caCertChain option specifies a concatenated list of certificates, including intermediate CA and root CA certificates, for the TCPS configuration.

Q: What does the –precheckOnly option do?

A: The --precheckOnly option allows you to run prechecks without making any actual changes. The valid values are “yes” to run only the prechecks and “no” to proceed with the rotation.

Q: How is the –serverCert option used?

A: The --serverCert option specifies the path to the PEM (Privacy Enhanced Mail) server certificate that is used or rotated for the TCPS configuration.

Q: What does the –privateKey option specify?

A: The --privateKey option specifies the path to the private key file corresponding to the server certificate used for TCPS rotation.

Q: What are the valid values for the –certType option?

A: The --certType option accepts the following values for specifying the type of certificate to be added to the Grid Infrastructure wallet:

Q: What does the –privateKeyPasswordProtected option do?

A: The --privateKeyPasswordProtected option indicates whether the private key is password-protected. Valid values are true (default) and false

Q: Can I run the dbaascli grid rotateTCPSCert command without rotating the certificates?

A: Yes, by using the --precheckOnly yes option, you can run only the prechecks without rotating the certificates.

Q: What is an example of a command to rotate a certificate using a PKCS12 wallet?

A: Here’s an example command:

dbaascli grid rotateTCPSCert --pkcs12WalletFilePath /path/to/wallet.p12 --certType PKCS12_CERT

Q: How do I rotate a server certificate with a CA-signed certificate chain?

A: Use the --serverCert and --caCertChain options as shown here:

dbaascli grid rotateTCPSCert --serverCert /path/to/serverCert.pem --caCertChain /path/to/caChain.pem

Q: What happens if I don’t specify –privateKeyPasswordProtected?

A: If you don’t specify the --privateKeyPasswordProtected option, the command assumes that the private key is password-protected (default: true).

Q: Can I rotate a self-signed certificate?

A: Yes, you can rotate a self-signed certificate by using the default --certType SELF_SIGNED_CERT option or specifying it explicitly.

Q: How can I rotate a certificate without providing a private key?

A: For certain certificate types, like PKCS12, you may not need to provide a separate private key file, as it is included in the wallet. However, if a private key is required, it must be provided using the --privateKey option.

Q: What if I want to rotate a certificate in the background?

A: The dbaascli grid rotateTCPSCert command doesn’t provide an explicit option for background execution. You may run the command directly in a background session (e.g., using nohup or similar tools).

Q: What is the default certificate type if not specified?

A: The default certificate type is SELF_SIGNED_CERT.

Example: dbaascli grid rotateTCPSCert

To rotate cert using self-signed certificate (default option):

dbaascli grid rotateTCPSCert

To rotate cert using CA-signed certificate:

dbaascli grid rotateTCPSCert --cert_type CA_SIGNED_CERT --server_cert /tmp/certs/server_cert.pem --ca_cert_chain /tmp/certs/ca.pem --private_key /tmp/certs/encrypted_private.key --privateKeyPasswordProtected true

dbaascli grid upgrade

To upgrade Oracle Grid Infrastructure from one major version to another, use the dbaascli grid upgrade command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli grid upgrade --version
[--resume]
[--executePrereqs]
[--containerURL]
[--softwareOnly]
[--targetHome]
[--revert]

Parameters:

Parameter Description
--version specifies the target version
--resume resumes the previous run
--executePrereqs runs prereqs for Grid Infrastructure upgrade
--containerUrl specifies the custom URL for fetching Grid Infrastructure image
--softwareOnly installs only the Grid Infrastructure software
--targetHome specifies the path of existing target Grid home
--revert reverts failed run

Frequently Asked Questions:

Q: What is the purpose of the dbaascli grid upgrade command?

A: The dbaascli grid upgrade command is used to upgrade Oracle Grid Infrastructure from one major version to another on an Oracle Base Database Cloud@Customer virtual machine.

Q: What is the prerequisite for running the dbaascli grid upgrade command?

A: The command must be run as the root user, and you need to be connected to an Oracle Base Database Cloud@Customer virtual machine.

Q: What does the –version option specify?

A: The --version option specifies the target version of Oracle Grid Infrastructure that you want to upgrade to.

Q: What does the –resume option do?

A: The --resume option resumes a previously interrupted or failed Grid Infrastructure upgrade process.

Q: How is the –executePrereqs option used?

A: The --executePrereqs option runs only the prerequisite checks for the Grid Infrastructure upgrade without performing the actual upgrade.

Q: What is the purpose of the –containerURL option?

A: The --containerURL option specifies a custom URL to fetch the Grid Infrastructure software image for the upgrade.

Q: What does the –softwareOnly option do?

A: The --softwareOnly option installs only the Grid Infrastructure software without configuring or upgrading the Grid environment.

Q: When would you use the –targetHome option?

A: The --targetHome option specifies the path to the existing target Grid home where the upgrade will be performed.

Q: What happens if the upgrade fails?

A: If the upgrade fails, you can use the --revert option to roll back the upgrade to its previous state.

Q: Can I perform a Grid Infrastructure upgrade in stages?

A: Yes, by using the --softwareOnly option, you can first install the software and then later complete the full upgrade, allowing for staged upgrades.

Q: How do I use the dbaascli grid upgrade command to upgrade only the software?

A: Use the following syntax to upgrade only the software:

dbaascli grid upgrade --version <target_version> --softwareOnly

Q: Can I check for upgrade prerequisites without performing the upgrade?

A: Yes, you can run only the prerequisite checks using:

dbaascli grid upgrade --version <target_version> --executePrereqs

Q: How can I upgrade Grid Infrastructure using a custom container URL?

A: You can specify the URL for fetching the Grid Infrastructure image as follows:

dbaascli grid upgrade --version <target_version> --containerURL <custom_url>

Q: How can I resume a previously interrupted upgrade process?

A: To resume a previously interrupted or failed upgrade, use:

dbaascli grid upgrade --version <target_version> --resume

Q: What does the –revert option do in the dbaascli grid upgrade command?

A: The --revert option rolls back a failed or interrupted Grid Infrastructure upgrade to its original state.

Q: Can I perform a full upgrade without configuring the Grid Infrastructure immediately?

A: Yes, you can first install only the software using the --softwareOnly option and then configure it later.

Q: What should I do if an upgrade fails and I want to undo the changes?

A: Use the --revert option to roll back the failed upgrade:

dbaascli grid upgrade --version <target_version> --revert

Example: dbaascli grid upgrade

dbaascli grid upgrade --version 19.11.0.0.0 --executePrereqs
DBAAS CLI version MAIN
Executing command grid upgrade --version 19.11.0.0.0 --executePrereqs

dbaascli grid patch

To patch Oracle Grid Infrastructure to the specified minor version, use the dbaascli grid patch command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli grid patch
 {
            --targetVersion <value>
            | --targetHome <value>
        }
        [--executePrereqs] [--nodeList <value>] [--continueWithDbDowntime] [--drainTimeoutInSeconds <value>] [--containerURL <value>] [--imageFile <value>] [--patchInParallel]
        {
            [--resume [--sessionID <value>]]
            | [--rollback [--sessionID <value>]]
        }
        [--waitForCompletion <value>]

Parameters:

Parameter Description
--targetVersion specifies the target version of Oracle home specified as five numeric segments separated by periods (e.g. 19.12.0.0.0)
--targetHome specifies the fully qualified path of the target Grid Infrastructure home for the out of place patching
--containerURL specifies custom URL for fetching Grid Infrastructure image
--executePrereqs option to run prereqs
--nodeList specifies a comma-delimited list of nodes if patching has to be performed on a subset of nodes
--patchInParallel specifies to perform patching remote nodes in parallel
--rollback specifies to roll back patched Oracle home
--resume resumes the previous run
--sessionID specifies to resume a specific session ID
--continueWithDbDowntime continues patching with database downtime. This option can be used in environments wherein there is only 1 active instance up and the patching operation can be continued even with a downtime.
--drainTimeoutInSeconds specifies the time (in seconds) to complete the resource draining while stopping the database
--createImage creates an image from a copy of the active Grid home, patched to the specified target version
--createImageDir specifies fully qualified path of the directory where the image is to be created
--imageFile specifies fully qualified path of the image to be used
--patchInParallel performs the patching of the remote nodes in parallel
--waitForCompletion specifies false to run the operation in background. Valid values: true or false

Frequently Asked Questions:

Q: What does the dbaascli grid patch command do?

A: The dbaascli grid patch command is used to patch Oracle Grid Infrastructure to a specified minor version.

Q: Do I need special permissions to run the dbaascli grid patch command?

A: Yes, you need to run the dbaascli grid patch command as the root user.

Q: Can I specify a target version when patching Oracle Grid Infrastructure?

A: Yes, you can specify the target version using the --targetVersion option.

Q: How do I specify the target version for the patch?

A: Use the --targetVersion option followed by the version number in the format 19.12.0.0.0.

Q: What does the –containerURL option do in the dbaascli grid patch command?

A: The --containerURL option allows you to specify a custom URL for fetching the Grid Infrastructure image.

Q: What is the purpose of the –executePrereqs option?

A: The --executePrereqs option is used to run prerequisite checks before applying the patch.

Q: How can I patch a subset of nodes using the dbaascli grid patch command?

A: Use the --nodeList option followed by a comma-delimited list of node names to patch only a subset of nodes.

Q: What happens if I use the –rollback option?

A: The --rollback option will roll back the patched Oracle home to its previous state.

Q: Can I resume a previous patching session?

A: Yes, you can use the --resume option to resume the last patching session. If you have a specific session ID, you can specify it with the --sessionID option.

Q: What is the –continueWithDbDowntime option used for?

A: The --continueWithDbDowntime option allows you to continue patching even if there is database downtime, typically used in environments where there is only one active instance.

Q: How do I create an image from a patched Grid home?

A: Use the --createImage option to create an image. You can specify the directory where the image should be created using the --createImageDir option.

Q: What is the purpose of the –imageFile option?

A: The --imageFile option allows you to specify the fully qualified path of the image file to be used for patching.

Q: How can I run the dbaascli grid patch command in the background?

A: You can use the --waitForCompletion option set to false to run the operation in the background.

Q: Can I use a custom URL to fetch the patch image?

A: Yes, you can use the --containerURL option to specify a custom URL for fetching the Grid Infrastructure image.

Q: How do I specify which nodes to patch if I don’t want to patch all of them?

A: You can specify the nodes you want to patch using the --nodeList option with a comma-separated list of node names.

Q: What should I do if I need to roll back a patch?

A: Use the --rollback option in the dbaascli grid patch command to roll back the patch.

Q: How do I handle a patching operation if my environment only has one active instance and I need to continue with downtime?

A: Use the --continueWithDbDowntime option to continue patching even with database downtime.

Q: Can I create an image of the patched Grid home?

A: Yes, you can use the --createImage option to create an image of the patched Grid home. If needed, specify the directory where the image should be saved using --createImageDir.

Q: What should I do if I want to resume a patching session after an interruption?

A: Use the --resume option to resume the patching session. If you know the session ID, you can specify it with --sessionID.

Q: What if the patching process fails midway?

A: If the patching process fails, you can use the --resume option to restart the process. You can also use the --rollback option to revert to the previous state.

Q: How can I ensure all prerequisites are met before patching?

A: Use the --executePrereqs option to run all prerequisite checks before applying the patch.

Q: Can I perform patching in the background to avoid holding up the terminal?

A: Yes, you can use the --waitForCompletion false option to run the patching process in the background.

Q: How can I create a Grid home image after patching?

A: Use the --createImage option to create a new image from the patched Grid home. Specify the directory using --createImageDir if needed.

Q: How do I use an existing image file for patching?

A: You can use the --imageFile option to specify the fully qualified path to the image file you want to use for patching.

Q: What should I do if I want to avoid database downtime during patching?

A: Ensure that your environment has more than one active instance running. You can avoid using the --continueWithDbDowntime option, which is meant for environments with only one active instance.

Q: How do I know the progress of a patch running in the background?

A: If you run the patch with --waitForCompletion false, you can check the status of the background job using operating system commands like ps or check the logs located in the Grid home.

Q: Is it possible to patch to a higher major version using dbaascli grid patch?

A: No, dbaascli grid patch only allows patching to a minor version of the current major version. For major upgrades, you will need to follow a different upgrade process.

Q: Can I skip specific prerequisite checks during patching?

A: No, when you use --executePrereqs, all prerequisite checks will be executed. However, you can review the results of the prerequisite checks and manually handle any issues before proceeding.

Q: What should I do if the patching process is stuck or hanging?

A: If the patching process is unresponsive, you can stop it using operating system commands and then resume using the --resume option. If that doesn’t work, try using the --rollback option to revert the patch.

Q: Can I automate the patching process across multiple clusters?

A: Yes, using scripts that include the dbaascli grid patch command with appropriate options, you can automate patching across different clusters.

Q: Where can I find logs for the patching process?

A: Logs are typically located in the Oracle Grid home logs directory or the default location specified during setup. You can monitor these logs for details about the patching process.

Q: Is it possible to create a silent patch process with no user interaction?

A: Yes, by specifying all necessary options in the command and running it in the background (--waitForCompletion false), you can create a non-interactive patching process.

Q: Can I check for available patch updates before applying a patch?

A: The dbaascli grid patch command itself does not have an option to list available patches. However, you can use Oracle’s standard methods such as Oracle Support to identify the latest patches.

Q: Can I use dbaascli to patch multiple Oracle Homes?

A: No, the dbaascli grid patch command is designed to patch a specific Oracle Grid Infrastructure home at a time. You would need to run the command separately for each home.

Q: Is there a way to prevent downtime completely when patching Grid Infrastructure?

A: To minimize downtime, ensure that your environment has multiple active database instances (RAC configuration) so that patching can be done node by node. The --continueWithDbDowntime option should not be used in this case.

Q: How do I handle patching for RAC One Node environments?

A: In RAC One Node environments, you need to be cautious with the --continueWithDbDowntime option, as there may be only one active instance. Review the Oracle documentation for specific patching guidelines for RAC One Node.

Q: Can I view the session history of previous patches?

A: The dbaascli utility does not provide a direct way to view session history. However, logs of previous patching sessions can be found in the Grid home logs directory.

Examples:

Example: Basic Grid Patching

dbaascli grid patch --targetVersion 19.12.0.0.0

Patches the Oracle Grid Infrastructure to version 19.12.0.0.0.

Example: Patching with a Custom Container URL

dbaascli grid patch --targetVersion 19.12.0.0.0 --containerURL https://example.com/custom/url

Patches Grid Infrastructure to version 19.12.0.0.0, using a custom container URL to fetch the Grid Infrastructure image.

Example: Patching with Prerequisite Checks

dbaascli grid patch --targetVersion 19.12.0.0.0 --executePrereqs

Patches Grid Infrastructure to version 19.12.0.0.0 after running the prerequisite checks.

Example: Patching on a Subset of Nodes

dbaascli grid patch --targetVersion 19.12.0.0.0 --nodeList node1,node2,node3

Patches Grid Infrastructure to version 19.12.0.0.0 on the specified nodes (node1, node2, and node3).

Example: Rolling Back the Patch

dbaascli grid patch --rollback

Rolls back the last applied patch on the Oracle Grid Infrastructure.

Example: Resuming a Previous Patch Operation

dbaascli grid patch --resume

Resumes the previous patching operation from where it was stopped.

Example: Resuming a Patch Operation with a Specific Session ID

dbaascli grid patch --resume --sessionID 12345

Resumes the patching operation using session ID 12345.

Example: Patching with Database Downtime Allowed

dbaascli grid patch --targetVersion 19.12.0.0.0 --continueWithDbDowntime

Patches the Grid Infrastructure to version 19.12.0.0.0 while allowing downtime of the database if needed.

Example: Creating a Patched Image

dbaascli grid patch --targetVersion 19.12.0.0.0 --createImage --createImageDir /path/to/dir

Creates an image of the patched Grid home (version 19.12.0.0.0) and stores it in the specified directory.

Example: Using an Existing Image File

dbaascli grid patch --targetVersion 19.12.0.0.0 --imageFile /path/to/image/file.zip

Patches Grid Infrastructure to version 19.12.0.0.0 using an existing image file located at /path/to/image/file.zip.

Example: Running the Patching Operation in the Background

dbaascli grid patch --targetVersion 19.12.0.0.0 --waitForCompletion false

Patches Grid Infrastructure to version 19.12.0.0.0 and runs the operation in the background.

Example: Combination of Prerequisites, Custom URL, and Subset of Nodes

dbaascli grid patch --targetVersion 19.12.0.0.0 --executePrereqs --containerURL https://example.com/custom/url --nodeList node1,node2

Patches Grid Infrastructure to version 19.12.0.0.0, runs prerequisite checks, uses a custom URL for the image, and applies the patch only on node1 and node2.

Example: Creating a Patched Image with an Existing Image File

dbaascli grid patch --targetVersion 19.12.0.0.0 --createImage --createImageDir /path/to/dir --imageFile /path/to/existing/image.zip

Creates a patched image and stores it in the specified directory while using an existing image file for the patch.

Example: Verifying Prerequisites Without Patching

dbaascli grid patch --targetVersion 19.12.0.0.0 --executePrereqs

Verifies whether all prerequisites are met for patching to version 19.12.0.0.0 without actually applying the patch.

Example: Running Patch and Ignoring Prerequisite Failures

dbaascli grid patch --targetVersion 19.12.0.0.0 --continueWithDbDowntime --executePrereqs

Runs the patch even if some prerequisite checks fail. This is useful in scenarios where downtime is allowed, and certain prerequisites can be ignored.

Example: Checking Patch Logs for Issues

tail -f /u01/app/grid/logs/grid_patch.log

Monitors the patch log in real time to diagnose any issues during the patching process.

Example: Applying the Patch in a Parallel Environment

dbaascli grid patch --targetVersion 19.12.0.0.0 --nodeList node1,node2 --waitForCompletion false

Patches Grid Infrastructure on a subset of nodes (node1 and node2) and runs the process in the background.

Example: Using a Specific Image File from an External Source

dbaascli grid patch --targetVersion 19.12.0.0.0 --imageFile /mnt/images/grid_patch_19.12.zip

Patches Grid Infrastructure using a pre-downloaded image file located on an external storage device.

Example: Running Patch with a Custom Session ID

dbaascli grid patch --targetVersion 19.12.0.0.0 --resume --sessionID 67890

Resumes a patching operation that was interrupted, using session ID 67890.

Example: Scheduling Patching to Run at a Later Time

echo "dbaascli grid patch --targetVersion 19.12.0.0.0" | at 02:00

Schedules the patching command to run at 2:00 AM using the at command in Linux.

Example: Specifying Timeout for Completion

dbaascli grid patch --targetVersion 19.12.0.0.0 --waitForCompletion true --continueWithDbDowntime --timeout 7200

Patches Grid Infrastructure while allowing downtime, but waits up to 7200 seconds (2 hours) for completion before timeout.

Example: Creating a Custom Image for Another Environment

dbaascli grid patch --targetVersion 19.12.0.0.0 --createImage --createImageDir /backups/images/grid_patch

Creates a custom image of the patched Grid Infrastructure to store in the /backups/images/grid_patch directory for use in other environments.

Example: Patch Recovery After Interruption

dbaascli grid patch --resume --continueWithDbDowntime

Recovers and resumes the patching process if it was interrupted, with database downtime allowed.

Example: Combining Prerequisites Check with Background Execution

dbaascli grid patch --targetVersion 19.12.0.0.0 --executePrereqs --waitForCompletion false

Checks prerequisites and runs the patch in the background.

Example: Skipping Image Creation for Faster Patching

dbaascli grid patch --targetVersion 19.12.0.0.0 --patchInParallel --continueWithDbDowntime --waitForCompletion false

Patches Grid Infrastructure to version 19.12.0.0.0 in parallel across nodes, with database downtime allowed, and without creating an image to speed up the process.

Example: Monitoring Patch Progress Through Logs

tail -f /u01/app/grid/logs/grid_patch_progress.log

Monitors the log file for patching progress in real-time, providing insights into each step of the patching process.

Example: Patching with Custom Drain Timeout

dbaascli grid patch --targetVersion 19.12.0.0.0 --drainTimeoutInSeconds 3600 --continueWithDbDowntime

Patches Grid Infrastructure and sets a custom timeout of 1 hour (3600 seconds) to allow graceful resource draining during database downtime.

Example: Applying a Patch to Specific Nodes with Prerequisite Checks

dbaascli grid patch --targetVersion 19.12.0.0.0 --nodeList node1,node4 --executePrereqs

Patches only nodes node1 and node4 to version 19.12.0.0.0 and runs the prerequisite checks beforehand.

Example: Patching Without Waiting for Completion

dbaascli grid patch --targetVersion 19.12.0.0.0 --waitForCompletion false

Begins patching the Grid Infrastructure to version 19.12.0.0.0 in the background, allowing other tasks to be performed without waiting for the process to complete.

Example: Reapplying a Failed Patch After a Drain Timeout Issue

dbaascli grid patch --resume --drainTimeoutInSeconds 7200

Resumes the previous patching session and extends the resource draining timeout to 2 hours (7200 seconds) in case it failed due to insufficient time in the previous attempt.

Example: Viewing Patch Logs in Real-Time with Specific Session ID

tail -f /u01/app/grid/logs/grid_patch_12345.log

Monitors the log file for the patching session with session ID 12345 in real-time.

Example: Patching to a New Target Home

dbaascli grid patch --targetHome /u01/app/grid_home_19c --executePrereqs

Performs an out-of-place patch to a new Oracle Grid home located at /u01/app/grid_home_19c, with prerequisite checks.

Example: Stopping a Background Patch Job

ps -ef | grep dbaascli | grep patch | awk '{print $2}' | xargs kill -9

Stops a background patch job by finding and stopping the associated process ID (PID).

Example: Verifying Patch Completion Without Logs

dbaascli grid status --targetVersion 19.12.0.0.0

Verifies if the patch to version 19.12.0.0.0 has been successfully applied by checking the current Grid Infrastructure version status.