Database Home Management

This section provides tools for managing Oracle AI Database homes. It includes commands such as dbaascli dbhome create to create a new Oracle AI Database home and dbaascli dbHome delete to remove an existing one. You can also view detailed information about a specific Oracle home with dbaascli dbHome getDetails and check which databases are running from a given Oracle home using dbaascli dbhome getDatabases. These commands ensure efficient management of database environments.

dbaascli dbhome create

To create an Oracle AI Database home of required version, use the dbaascli dbhome create command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli dbhome create --version <value>
[--oracleHome <value>]
[--oracleHomeName <value>]
[--enableUnifiedAuditing <value>]
[--imageTag <value>]
[--ImageLocation <value>

Parameters:

Parameter Description
--version specifies the version of Oracle home specified as five numeric segments separated by periods, for example, 19.12.0.0.0
--oracleHome specifies the location of Oracle home
--oracleHomeName specifies user-defined Oracle home name. If not provided, then the default name will be used
--enableUnifiedAuditing specifies true or false to enable or disable unified auditing link option in Oracle home
--imageTag specifies Oracle home image tag
--imageLocation path of the image to be used.
--waitForCompletion specifies false to run the operation in background. Valid values: true or false.

Frequently Asked Questions:

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

A: The dbaascli dbhome create command is used to create a new Oracle AI Database home with the required version.

Q: What are the prerequisites for running the dbaascli dbhome create command?

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

Q: How do I specify the Oracle Database version while creating a new Oracle Home?

A: Use the --version option followed by the Oracle AI Database version in the format of five numeric segments separated by periods, such as 19.11.0.0.0.

Q: What does the –oracleHome option specify?

A: The --oracleHome option specifies the location where you want to install the Oracle home. If not provided, the default location will be used.

Q: Can I assign a custom name to the new Oracle Home?

A: Yes, you can use the --oracleHomeName option to specify a user-defined name for the Oracle home. If not specified, a default name will be used.

Q: How do I enable or disable Unified Auditing in the new Oracle Home?

A: Use the --enableUnifiedAuditing option and specify true to enable or false to disable Unified Auditing for the Oracle home.

Q: What does the –imageTag option do?

A: The --imageTag option specifies the Oracle home image tag, which can be used in cases where the image tag differs from the version.

Q: What is an example of using the dbaascli dbhome create command with version and image tag?

A: An example of the command with version and image tag is:

dbaascli dbhome create --version 19.8.0.0.0 --imageTag 19.8.0.0.0

This creates an Oracle home for version 19.8.0.0.0 with the corresponding image tag.

Q: What happens if I don’t provide the –oracleHome or –oracleHomeName options?

A: If --oracleHome is not provided, the Oracle home will be installed in the default location. If --oracleHomeName is not specified, a default name will be assigned to the Oracle home.

Q: How can I verify if the Oracle Home creation was successful?

A: After running the command, check the output logs for any success messages or errors. You can also verify the Oracle home by navigating to the specified location or using Oracle tools like orainstRoot.sh.

Q: Is it possible to create multiple Oracle Homes with different versions on the same system?

A: Yes, you can create multiple Oracle homes with different versions by specifying different values for the --version and --oracleHomeName options.

Q: What should I do if the Oracle Home creation fails?

A: Check the output logs for detailed error messages. Verify that you have the valid version format, required permissions, and sufficient disk space. Fix any issues and try running the command again.

Example: dbaascli dbhome create

dbaascli dbhome create --version 19.11.0.0.0

Alternatively, dbaascli dbhome create --version 19.8.0.0.0.0 --imageTag 19.8.0.0.0 for cases where image tags are different from version.

dbaascli dbHome delete

To delete a given Database home, use the dbaascli dbHome delete command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli dbHome delete
{ --oracleHome <value>
| --oracleHomeName <value> } [--resume [--sessionID <value>]]

Parameters:

Parameter Description
--oracleHome specifies the location of the Oracle home
--oracleHomeName specifies the name of the Oracle home
--resume resumes the previous execution
--sessionID specifies to resume a specific session ID

Frequently Asked Questions:

Q: What is the purpose of the dbaascli dbHome delete command?

A: The dbaascli dbHome delete command is used to delete a specified Database home from the system.

Q: What are the prerequisites for running the dbaascli dbHome delete command?

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

Q: How do I specify the Oracle Home to be deleted?

A: You can specify the Oracle home to be deleted using one of the following options:

Q: What is the difference between –oracleHome and –oracleHomeName options?

A:

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

A: You can use the --resume option to resume a previous deletion process. If you know the specific session ID of the process, you can include it with the --sessionID option.

Q: What is the –sessionID option used for in the dbaascli dbHome delete command?

A: The --sessionID option is used to resume a specific session that was previously interrupted or failed during the deletion process.

Q: What happens if I do not provide the –resume or –sessionID options?

A: If the --resume or --sessionID options are not provided, the command will initiate a new deletion process instead of resuming an interrupted one.

Q: Is there any way to confirm the deletion of the Oracle Home after running the command?

A: You can verify the deletion by checking the output logs for success messages and ensuring the Oracle home directory is no longer present at the specified location.

Q: Can I delete an Oracle Home that is currently in use by a running database?

A: No, the Oracle home should not be in use by any running databases or services during the deletion process. Make sure to stop any related databases before running the delete command.

Q: What should I do if the dbaascli dbHome delete command fails?

A: Review the output logs for any error messages. Ensure that the Oracle home is not in use, verify the valid Oracle home location or name, and confirm that you have the necessary permissions. After resolving any issues, rerun the command or use the --resume option if needed.

Q: Can I delete multiple Oracle Homes at once using the dbaascli dbHome delete command?

A: No, the command only allows you to delete one Oracle home at a time by specifying either the --oracleHome or --oracleHomeName option.

Q: What is an example of deleting an Oracle Home by its name?

A: Here is an example of deleting an Oracle home by name:

dbaascli dbHome delete --oracleHomeName myOracleHome

This command deletes the Oracle home with the name myOracleHome.

Q: What is an example of deleting an Oracle Home by its location?

A: Here is an example of deleting an Oracle home by specifying its location:

dbaascli dbHome delete --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1

This command deletes the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1.

Q: Can I cancel the deletion process once it has started?

A: No, once the deletion process has started, it cannot be canceled. Ensure that the Oracle home is ready for deletion before executing the command.

dbaascli dbhome getDatabases

To view information about all Oracle Databases running from a given database Oracle home, use the dbaascli dbHome getDatabases command. Specify either the Oracle home location or Oracle home name.

Run the command as the root user.

Syntax:

dbaascli dbHome getDatabases
{ --oracleHomeName value | --oracleHome value }

Parameters:

Parameter Description
--oracleHomeName specifies user-defined Oracle home name
--oracleHome specifies the location (path) of Oracle home

Frequently Asked Questions:

Q: What is the purpose of the dbaascli dbHome getDatabases command?

A: The dbaascli dbHome getDatabases command is used to view information about all Oracle Databases running from a specified Oracle Database home.

Q: How can I specify the Oracle Database home to check?

A: You can specify the Database home by using one of the following options:

Q: What is the difference between –oracleHomeName and –oracleHome options?

A:

Q: How do I run the dbaascli dbHome getDatabases command?

A: To run the command, use the following syntax:

dbaascli dbHome getDatabases --oracleHomeName <value>

or

dbaascli dbHome getDatabases --oracleHome <value>

Ensure to run the command as the root user.

Q: Can I specify both the Oracle home name and Oracle home location in the same command?

A: No, you can only specify either --oracleHomeName or --oracleHome in a single command execution. Select one option based on how you identify the Oracle home.

Q: What kind of information does the dbaascli dbHome getDatabases command return?

A: The command returns information about all Oracle Databases running from the specified Oracle home. This includes details such as database names and statuses.

Q: What is an example of using dbaascli dbHome getDatabases with the Oracle home location?

A: Here is an example of using the command with the Oracle home location:

dbaascli dbHome getDatabases --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1

This command retrieves the list of databases running from the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1.

Q: What is an example of using dbaascli dbHome getDatabases with the Oracle home name?

A: Here is an example of using the command with the Oracle home name:

dbaascli dbHome getDatabases --oracleHomeName myOracleHome

This command retrieves the list of databases running from the Oracle home named myOracleHome.

Q: Do I need any special permissions to run this command?

A: Yes, you must run the command as the root user to view the information about Oracle Databases running from a specified Oracle home.

Q: What should I check if the dbaascli dbHome getDatabases command returns no databases?

A: Ensure that you have specified a valid Oracle home name or location and that there are databases running from that Oracle home. Additionally, confirm that the Oracle home is properly configured and active.

Q: Can I use the dbaascli dbHome getDatabases command on multiple Oracle homes at once?

A: No, the command works on a single Oracle home at a time. You must run the command separately for each Oracle home you want to query.

Q: Is there a way to verify that the Oracle home specified in the command is correct?

A: You can verify the Oracle home by checking the directory structure or the configuration details in your system to ensure the path or name provided matches the actual Oracle home.

Q: What happens if I run the command without specifying an Oracle home or Oracle home name?

A: The command requires either the --oracleHome or --oracleHomeName option to be specified. If neither option is provided, the command will fail to execute.

Q: Can this command retrieve databases that are currently stopped?

A: Yes, the command will list all databases associated with the specified Oracle home, regardless of whether they are currently running or stopped.

Example: dbaascli dbHome getDatabases –oracleHome

dbaascli dbHome getDatabases --oracleHome /u02/app/mar_home/

dbaascli dbHome getDetails

To view information about a specific Oracle home, use the dbaascli dbHome getDetails command. Specify either the Oracle home location or Oracle home name.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli dbHome getDetails
{ --oracleHomeName value | --oracleHome value }

Parameters:

Parameter Description
--oracleHomeName specifies user-defined Oracle home name
--oracleHome specifies the location of Oracle home

Frequently Asked Questions:

Q: What is the purpose of the dbaascli dbHome getDetails command?

A: The dbaascli dbHome getDetails command is used to view detailed information about a specific Oracle home on the system.

Q: How do I specify the Oracle home I want to get details about?

A: You can specify the Oracle home using one of the following options:

Q: What is the difference between –oracleHomeName and –oracleHome?

A:

Q: How do I run the dbaascli dbHome getDetails command?

A: To run the command, use the following syntax:

dbaascli dbHome getDetails --oracleHomeName <value>

or

dbaascli dbHome getDetails --oracleHome <value>

Make sure to run the command as the root user.

Q: Can I specify both –oracleHomeName and –oracleHome in the same command?

A: No, you can only use one option per command execution. You must either specify the Oracle home name or the Oracle home location, not both.

Q: What information does the dbaascli dbHome getDetails command return?

A: The command provides detailed information about the specified Oracle home, such as its version, status, and any other configuration details associated with the Oracle home.

Q: What is an example of using the dbaascli dbHome getDetails command with an Oracle home location?

A: Here is an example:

dbaascli dbHome getDetails --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1

This command retrieves detailed information about the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1.

Q: What is an example of using the dbaascli dbHome getDetails command with an Oracle home name?

A: Here is an example:

dbaascli dbHome getDetails --oracleHomeName myOracleHome

This command retrieves detailed information about the Oracle home named myOracleHome.

Q: Do I need any special permissions to run this command?

A: Yes, you must run the command as the root user to view details about the Oracle home.

Q: What should I do if the dbaascli dbHome getDetails command returns no information?

A: Ensure that you have correctly specified the Oracle home name or location, and that the Oracle home is properly configured and exists on the system.

Q: Can I use the dbaascli dbHome getDetails command on multiple Oracle homes simultaneously?

A: No, the command only works on a single Oracle home at a time. You must run the command separately for each Oracle home.

Q: Is it possible to verify the Oracle home name before running the command?

A: Yes, you can verify the Oracle home name by checking your system’s configuration files or by listing all Oracle homes available on your system.

Q: What happens if I do not specify an Oracle home name or location in the command?

A: The command requires either the --oracleHome or --oracleHomeName option to be specified. If neither is provided, the command will fail to execute.

Q: Can I retrieve information about Oracle homes that are currently not in use?

A: Yes, the dbaascli dbHome getDetails command provides details about Oracle homes regardless of whether they are in use or idle.

Q: What should I check if the command returns an error?

A: Ensure that the Oracle home name or location is valid, the Oracle home exists, and that you are running the command as the root user. Double-check for typos or incorrect paths.

Example: dbaascli dbHome getDetails - using Oracle home location

dbaascli dbHome getDetails --oracleHome /u02/app/home_db19c/

Example: dbaascli dbHome getDetails - using Oracle home name

dbaascli dbHome getDetails --oracleHomeName home_db19c

dbaascli dbHome patch

To patch Oracle home from one patch level to another, use the dbaascli dbHome patch command.

Prerequisites:

Run the command as the root user.

Syntax:

dbaascli dbHome patch

{
    --oracleHome <value>
    | --oracleHomeName <value>
 }
        [--imageFilePath <value>] [--executePrereqs] [--nodes <value>]
        {
            [--resume [--sessionID <value>]]
            | [--rollback [--sessionID <value>]]
        }
[--skipDatapatch]
[--skipClosedPDBs]
[--skipPDBs <value>]
[--continueWithDbDowntime]
[--skipUnreachableNodes]
[--drainTimeoutInSeconds <value>]
[--waitForCompletion <value>]
[--nonRolling]
[--skipDatapatchForDB <value>]

Parameters:

Parameter Description
--oracleHome specifies the path of Oracle home
--oracleHomeName specifies the name of Oracle home
--targetVersion specifies the target version of Oracle home specified as five numeric segments separated by periods, for example, 19.12.0.0.0.
--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 one active instance up and the patching operation can be continued even with a downtime.
--skipUnreachableNodes skips operation on unreachable nodes
--nodes specifies a comma-delimited list of nodes if patching has to be performed on a subset of nodes
--executePrereqs runs prereqs
--skipDatapatch skips running datapatch on the databases
--imageFilePath specifies the absolute path of the image file to be used
--skipPDBs skips running the datapatch on a specified comma-delimited list of PDBs. For example: cdb1:pdb1,cdb2:pdb2, and so on
--skipClosedPdbs skips running datapatch on closed PDBs
--rollback rolls back patched Oracle home.
--waitForCompletion specifies false to run the operation in background. Valid values : true or false
--drainTimeoutInSeconds specifies time (in seconds) to complete the resource draining while stopping the database
--skipUnreachableNodes skips operation on unreachable nodes
[--nonRolling] patches the dbhome on all nodes in parallel. Note that this would cause a downtime in the database.
[--skipDatapatchForDB <value>] skips running datapatch on the specified comma-delimited list of databases. Example: db1,db2,db3,...

Frequently Asked Questions:

Q: What is the dbaascli dbHome patch command used for?

A: The dbaascli dbHome patch command is used to patch Oracle home from one patch level to another.

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

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

Q: How do I specify the Oracle home path or name for the patch?

A: Use the --oracleHome option to specify the path of the Oracle home, or --oracleHomeName to specify the name of the Oracle home.

Q: How can I define 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 –resume option do?

A: The --resume option allows you to resume a previous patching session.

Q: How do I specify a particular session ID when resuming a patch?

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

Q: What is the –continueWithDbDowntime option used for?

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

Q: How can I skip patching on unreachable nodes?

A: Use the --skipUnreachableNodes option to skip operations on nodes that are unreachable.

Q: How do I patch only specific nodes in a cluster?

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

Q: What is the –executePrereqs option for?

A: The --executePrereqs option runs prerequisite checks before applying the patch.

Q: How can I skip running datapatch on the databases?

A: Use the --skipDatapatch option to skip the datapatch process during patching.

Q: Can I specify a custom location for the database image?

A: Yes, use the --imageLocation option to specify a custom location for the database image.

Q: What does the –skipPDBs option do?

A: The --skipPDBs option allows you to skip running datapatch on a specified comma-delimited list of pluggable databases (PDBs).

Q: How can I skip datapatch on closed PDBs?

A: Use the --skipClosedPDBs option to skip datapatch on PDBs that are closed.

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

A: The --rollback option will revert the Oracle home to its previous state before the patch was applied.

Q: How do I specify the Oracle home path for patching?

A: Use the --oracleHome option followed by the path to the Oracle home directory.

Q: How can I patch an Oracle home by its name rather than the path?

A: Use the --oracleHomeName option followed by the name of the Oracle home.

Q: How do I resume a patching operation if it was interrupted?

A: Use the --resume option along with the --sessionID option to resume a specific interrupted session.

Q: Can I continue the patching process if the database is down?

A: Yes, use the --continueWithDbDowntime option to continue patching even if the database is down.

Q: What should I do if some nodes are unreachable during the patching process?

A: Use the --skipUnreachableNodes option to bypass the unreachable nodes.

Q: How can I apply the patch to only certain nodes?

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

Q: How do I check prerequisites before applying the patch?

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

Q: What should I do if I want to avoid applying datapatch during the patching process?

A: Use the --skipDatapatch option to skip the datapatch step.

Q: How can I specify a different location for the database image used in the patching process?

A: Use the --imageLocation option to specify a custom location for the image.

Q: What if I need to skip datapatch on certain PDBs?

A: Use the --skipPDBs option to skip datapatch on a specified comma-delimited list of PDBs.

Q: Can I skip datapatch on PDBs that are not currently open?

A: Yes, use the --skipClosedPDBs option to skip datapatch on closed PDBs.

Q: What should I do if the patching fails midway?

A: You can use the --rollback option to revert to the previous state or try resuming the patching process with the --resume option.

Q: How can I check if all prerequisites are met before applying the patch?

A: Run the patch command with the --executePrereqs option to ensure all prerequisites are satisfied.

Q: What if the patching operation does not complete successfully and I need to retry?

A: Use the --resume option to retry the patching operation from where it left off. If needed, you can specify a --sessionID to resume a specific session.

Q: How can I verify if the patch was successfully applied?

A: You can verify the patching process by checking the Oracle home version using the opatch lsinventory command after the patch is completed.

Q: Can I run the patching command in a dry run mode to preview actions?

A: No, the dbaascli dbHome patch command does not have a dry-run feature. However, you can use the --executePrereqs option to run prerequisite checks before actually applying the patch.

Q: Is it possible to apply multiple patches in one run?

A: The dbaascli dbHome patch command only allows for one target version at a time. You would need to run the command separately for each patch version.

Q: How do I handle patching if the environment uses multiple Oracle homes?

A: You can specify the Oracle home you want to patch using either the --oracleHome or –oracleHomeName options, depending on whether you’re specifying the path or the name of the Oracle home.

Q: Can I skip both PDB and CDB datapatching in one command?

A: Yes, you can combine the --skipPDBs and --skipDatapatch options to skip datapatching for both PDBs and the CDB in a single patch run.

Q: Can I apply a patch and rollback immediately if it causes issues?

A: Yes, after applying a patch, you can use the --rollback option to revert to the previous patch level if any issues arise.

Q: Can I patch multiple Oracle homes simultaneously?

A: No, you need to run the dbaascli dbHome patch command individually for each Oracle home.

Q: How do I track the progress of the patching operation?

A: During the patching process, the command provides output messages that show the progress. You can also check the log files for detailed information.

Q: Can I run patching in parallel on a clustered environment?

A: Patching operations can be applied to a subset of nodes using the --nodes option. However, simultaneous patching should be handled carefully, and you should ensure no overlapping sessions.

Q: How can I identify which patches are available for my Oracle home?

A: You can check the available patches via the Oracle support portal or by running the opatch lsinventory command to see the current patches applied to your Oracle home.

Q: Can I specify a timeout for draining resources when stopping the database during patching?

A: Yes, you can use the --drainTimeoutInSeconds option to specify the time in seconds for resource draining when stopping the database.

Q: What happens if the patch fails on one of the nodes in a multi-node environment?

A: You can use the --skipUnreachableNodes option to skip the failed node and continue the patching process on the remaining nodes. You can then address the issue on the failed node separately.

Q: How can I make the patching process run in the background?

A: Use the --waitForCompletion option with a value of false to allow the patching process to run in the background. This way, you don’t need to wait for the process to complete interactively.

Q: Can I perform a rollback operation on a subset of nodes in a clustered environment?

A: Yes, you can use the --nodes option along with the --rollback option to roll back the patching on a specific set of nodes.

Q: What if I need to update the image location after starting the patch process?

A: The --resume option does not allow changing the image location. However, you can stop the session and start a new patch process with the updated --imageLocation.

Q: Is there a way to check which session IDs are available for resuming a patch?

A: You can check the log files or use Oracle Cloud tools to identify active or paused patching sessions and their session IDs.

Q: Can I limit the downtime during patching?

A: If you need to limit downtime, use the --continueWithDbDowntime option carefully. This allows you to proceed even when downtime is expected but requires planning for minimal service impact.

Examples:

Example: Basic Oracle Home Patching by Oracle Home Path

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0

Patches the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1 to version 19.12.0.0.0.

Example: Patching by Oracle Home Name

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.12.0.0.0

Patches Oracle home named DB_HOME_NAME to version 19.12.0.0.0.

Example: Resuming a Previous Patch Operation

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --resume

Resumes the previous patching operation for the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1.

Example: Resuming a Patch with a Specific Session ID

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --resume --sessionID 12345

Resumes the patching operation for Oracle home DB_HOME_NAME using session ID 12345.

Example: Patching with Database Downtime Allowed

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --continueWithDbDowntime

Patches the Oracle home located at /u01/app/oracle/product/19.0.0/dbhome_1 to version 19.12.0.0.0 while allowing database downtime.

Example: Skipping Unreachable Nodes

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipUnreachableNodes

Patches Oracle home to version 19.12.0.0.0 while skipping any unreachable nodes.

Example: Patching a Subset of Nodes

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --nodes node1,node2

Patches Oracle home to version 19.12.0.0.0 on node1 and node2 only.

Example: Running Prerequisite Checks Before Patching

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.12.0.0.0 --executePrereqs

Patches Oracle home DB_HOME_NAME to version 19.12.0.0.0 after running prerequisite checks.

Example: Skipping the Datapatch Step

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipDatapatch

Patches Oracle home to version 19.12.0.0.0 without running datapatch on the databases.

Example: Using an Image File for Patching

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --imageFilePath /path/to/image/file.zip

Patches Oracle home to version 19.12.0.0.0 using an image file located at /path/to/image/file.zip.

Example: Skipping Specific PDBs During Datapatch

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipPDBs cdb1:pdb1,cdb2:pdb2

Patches Oracle home to version 19.12.0.0.0 and skips running datapatch on the specified PDBs (pdb1 in cdb1 and pdb2 in cdb2).

Example: Skipping Datapatch on Closed PDBs

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipClosedPDBs

Patches Oracle home to version 19.12.0.0.0 while skipping running datapatch on any closed PDBs.

Example: Rolling Back Oracle Home

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --rollback

Rolls back the last applied patch on the Oracle home named DB_HOME_NAME.

Example: Combination of Patching with Prerequisite Checks and Specific Nodes

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --executePrereqs --nodes node1,node2

Patches Oracle home to version 19.12.0.0.0, runs prerequisite checks, and applies the patch only on node1 and node2.

Example: Skipping Unreachable Nodes and Specific PDBs

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.12.0.0.0 --skipUnreachableNodes --skipPDBs cdb1:pdb1

Patches Oracle home DB_HOME_NAME to version 19.12.0.0.0 while skipping unreachable nodes and avoiding running datapatch on pdb1 within cdb1.

Example: Checking Oracle Home Version Post-Patch

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0
opatch lsinventory

This example shows how to check the Oracle home version after a successful patch by running opatch lsinventory.

Example: Rolling Back Patching with Specific Session ID

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --rollback --sessionID 67890

Rolls back the Oracle home patching for a session ID of 67890.

Example: Patching with Skipping Prerequisite Checks

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipPrereqs

Patches the Oracle home but skips the prerequisite checks before applying the patch.

Example: Applying a Patch to a Custom Oracle Home Image

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.12.0.0.0 --imageLocation /custom/location/image.zip

Patches Oracle home using a custom image file located at /custom/location/image.zip.

Example: Skipping Specific Nodes and Running Prereqs

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipUnreachableNodes --executePrereqs

Skips patching unreachable nodes and runs prerequisite checks before applying the patch.

Example: Skipping Datapatch on All PDBs in Multiple CDBs

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipPDBs cdb1:pdb1,cdb2:pdb2,cdb3:pdb3

Patches Oracle home but skips datapatch on the specified PDBs in multiple CDBs.

Example: Continuing Patching with Downtime on Multiple Nodes

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.12.0.0.0 --continueWithDbDowntime --nodes node3,node4

Continues patching on node3 and node4 with database downtime allowed.

Example: Skipping Datapatch on PDBs and Closed PDBs

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0 --skipDatapatch --skipClosedPDBs

Patches Oracle home while skipping both the datapatch and closed PDBs.

Example: Rolling Back and Reapplying Patch

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --rollback
dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.12.0.0.0

Rolls back the current patch and then reapplies the patch to the Oracle home.

Example: Skipping Datapatch and Allowing Downtime on a Specific Node

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.13.0.0.0 --skipDatapatch --continueWithDbDowntime --nodes node1

Patches Oracle home to version 19.13.0.0.0 on node1, skipping the datapatch step and allowing downtime.

Example: Specifying Drain Timeout During Database Shutdown

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --targetVersion 19.13.0.0.0 --drainTimeoutInSeconds 300

Patches the Oracle home DB_HOME_NAME to version 19.13.0.0.0 and allows a 5-minute timeout (300 seconds) for draining resources during shutdown.

Example: Running Patching in the Background

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.13.0.0.0 --waitForCompletion false

Patches Oracle home to version 19.13.0.0.0 and runs the patching process in the background without waiting for completion.

Example: Rolling Back Patch on a Subset of Nodes

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --rollback --nodes node1,node2

Rolls back the last applied patch on node1 and node2 only for the specified Oracle home.

Example: Skipping Prerequisites and Patching Multiple Nodes

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.13.0.0.0 --skipPrereqs --nodes node3,node4

Patches Oracle home to version 19.13.0.0.0 on node3 and node4 without running prerequisite checks.

Example: Rolling Back Patch and Skipping Unreachable Nodes

dbaascli dbHome patch --oracleHomeName DB_HOME_NAME --rollback --skipUnreachableNodes

Rolls back the last patch on Oracle home DB_HOME_NAME and skips unreachable nodes during the rollback process.