Using the dbaascli Utility on Exadata Cloud Infrastructure

Learn to use the dbaascli utility on Exadata Cloud Infrastructure.

About Using the dbaascli Utility on Exadata Cloud Infrastructure

You can use the dbaascli utility to perform various database lifecycle and administration operations on Exadata Cloud Infrastructure such as changing the password of a database user, starting a database, managing pluggable databases (PDBs), and more.

You must use the Oracle Cloud Infrastructure console or command-line interface to scale resources. The capabilities of the dbaascli utility are in addition to, and separate from, the Console, API, or command-line interface (CLI). Unless specified differently, you need root access to dbaascli to run all administration commands.

To use the utility, you must be connected to an Exadata Cloud Infrastructure virtual machine. For detailed instructions, see Connecting to an Exadata Cloud Infrastructure Instance .

To get possible commands available with dbaascli, run dbaascli --help.

To get command-specific help, run dbaascli command --help. For example, dbaascli database create --help.

See dbasscli Command Reference in the document for commands and command specific information.

Creating Databases Using dbaascli

Using dbaascli, you can create an Oracle Database by first creating an Oracle Database home of desired version, followed by creating a database in that Oracle Database home

Listing Available Software Images and Versions for Database and Grid Infrastructure

To produce a list of available supported versions for patching, use the dbaascli cswlib showImages command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli cswlib showImages --product database

    The command output lists the available database software images.

    dbaascli cswlib showImages --product grid

    The command output lists the available grid software images.

  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli cswlib showImages.

Example 6-1 dbaascli cswlib showImages

[root@dg11lrg1 dbhome_1]# dbaascli cswlib showImages
DBAAS CLI version <version>
Executing command cswlib
      showImagesJob id: 00e89b1a-1607-422c-a920-22f44bec1953Log file location:
      /var/opt/oracle/log/cswLib/showImages/dbaastools_2022-05-11_08-49-12-AM_46941.log

############
List of Available Database Images
#############

17.IMAGE_TAG=18.17.0.0.0  
   VERSION=18.17.0.0.0  
   DESCRIPTION=18c JAN 2022 DB Image

18.IMAGE_TAG=19.10.0.0.0  
   VERSION=19.10.0.0.0  
   DESCRIPTION=19c JAN 2021 DB Image

19.IMAGE_TAG=19.11.0.0.0  
   VERSION=19.11.0.0.0  
   DESCRIPTION=19c APR 2021 DB Image

20.IMAGE_TAG=19.12.0.0.0
  VERSION=19.12.0.0.0
  DESCRIPTION=19c JUL 2021 DB Image

21.IMAGE_TAG=19.13.0.0.0  
  VERSION=19.13.0.0.0  
  DESCRIPTION=19c OCT 2021 DB Image

Images can be downloaded using their image tags. For details, see help using 'dbaascli cswlib download --help'.
dbaascli execution completed

Creating Oracle Database Home

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

Note

You can create an Oracle Database home with a specified Oracle home name. If you do not specify, then this is computed automatically (recommended).
  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli dbhome create --version Oracle Home Version --imageTag image Tag Value
    Where:
    • --version specifies the Oracle Database version
    • --imageTag specifies the Image Tag of the image to be used
    For example:
    dbaascli dbhome create --version 19.9.0.0.0
    Note

    Specifying imageTag is optional. To view the Image Tags, refer to command dbaascli cswlib showImages. Image Tags are typically same as the version of the database. However, it is kept as a provision for cases where multiple images may need to be released for the same version - each catering to a specific customer requirement.
  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli dbhome create.

Creating Oracle Database In the Specified Oracle Database Home

To create an Oracle Database in the specified Oracle Database home of desired version, use the dbaascli database create command.

You can use the dbaascli database create command to:
  • Create a Container Database (CDB) or non-Container Database
  • Create a CDB with pluggable databases (PDBs)
  • Create an Oracle Database with the specified Character Set
  • Create Oracle Databases on a subset of cluster nodes
    Note

    Databases created on a subset of nodes will not be displayed in the OCI console.
  • Create Oracle Database version 12.1.0.2 or higher with the release update JAN 2021 or higher. For databases with lower versions, it is recommended to use the OCI Console based API.
  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli database create --dbName database name --oracleHome Oracle Home Path
    Where:
    • --dbName specifies the name of the database
    • --oracleHome specifies Oracle home location
    To create a CDB, run the following command:
    dbaascli database create --dbName database name --oracleHome Oracle Home Path
    To create a non-CDB, run the following command:
    dbaascli database create --dbName database name --oracleHome Oracle Home Path --createAsCDB false

    When prompted, enter the sys and tde passwords.

  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli database create.

Running Prerequisite Checks Prior to Creating Oracle Database

To run prerequisites checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle Database creation.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli database create --dbName database name --oracleHome Oracle Home Path --executePrereqs
    Where:
    • --dbName specifies the name of the database
    • --oracleHome specifies the Oracle home location
  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli database create.

Resuming or Reverting Oracle Database Creation Operation

To resume or revert a failed database creation operation, use the --resume or --revert command option.

For example:
dbaascli database create --dbName database name --oracleHome Oracle Home Path --resume
Note

  • While using the --resume or --revert command options, ensure that you use the same command from the same node that was used for actual create operation flow.
  • You can resume database creation only if there is a failure in the post database creation step.

Changing the Database Passwords

To change the SYS password, or to change the TDE wallet password, use this procedure.

The password that you specify in the Database Admin Password field when you create a new Exadata Cloud Infrastructure instance or database is set as the password for the SYS, SYSTEM, TDE wallet, and PDB administrator credentials. Use the following procedures if you need to change passwords for an existing database.

Note

if you are enabling Data Guard for a database, then the SYS password and the TDE wallet password of the primary and standby databases must all be the same.
Note

Using the dbaascli to change the SYS password will ensure the backup/restore automation can parallelize channels across all nodes in the cluster.

To Change the SYS Password for an Exadata Cloud Infrastructure Database

  1. Log onto the Exadata Cloud Infrastructure virtual machine as opc.
  2. Run the following command:
    sudo dbaascli database changepassword --dbname database_name --user SYS

To Change Database Passwords in a Data Guard Environment

  1. Run the following command on the primary database:
    dbaascli database changePassword —dbName <dbname> --user SYS --prepareStandbyBlob true --blobLocation <location to create the blob file>
  2. Copy the blob file created to all the standby databases and update the file ownership to oracle user.
  3. Run the following command on all the standby databases:
    dbaascli database changePassword —dbName <dbname> --user SYS --standbyBlobFromPrimary <location of copies the blob file>

To Change the TDE Wallet Password for an Exadata Cloud Infrastructure Database

  1. Log onto the Exadata Cloud Infrastructure virtual machine as opc.
  2. Run the following command:
    sudo dbaascli tde changepassword --dbname database_name

Managing Exadata Cloud Infrastructure Software Images Using the Dbaascli Utility

You can list and download the Oracle database software images on an Exadata Cloud Infrastructure instance, which can then be used for provisioning a database home.

Note

You can create custom database software images for your Exadata Cloud Infrastructure instances using the Console or API. These images are stored in Object Storage, and can be used to provision a Database Home in your Exadata instance. See Oracle Database Software Images more information.

You can control the version of Oracle binaries that is installed when you provision a new database on an Exadata Cloud Infrastructure instance by maintaining the software images on the system. Oracle provides a library of cloud software images that you can view and download onto your instance by using the dbaascli utility.

Listing Available Software Images and Versions for Database and Grid Infrastructure

To produce a list of available supported versions for patching, use the dbaascli cswlib showImages command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli cswlib showImages --product database

    The command output lists the available database software images.

    dbaascli cswlib showImages --product grid

    The command output lists the available grid software images.

  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli cswlib showImages.

Example 6-2 dbaascli cswlib showImages

[root@dg11lrg1 dbhome_1]# dbaascli cswlib showImages
DBAAS CLI version <version>
Executing command cswlib
      showImagesJob id: 00e89b1a-1607-422c-a920-22f44bec1953Log file location:
      /var/opt/oracle/log/cswLib/showImages/dbaastools_2022-05-11_08-49-12-AM_46941.log

############
List of Available Database Images
#############

17.IMAGE_TAG=18.17.0.0.0  
   VERSION=18.17.0.0.0  
   DESCRIPTION=18c JAN 2022 DB Image

18.IMAGE_TAG=19.10.0.0.0  
   VERSION=19.10.0.0.0  
   DESCRIPTION=19c JAN 2021 DB Image

19.IMAGE_TAG=19.11.0.0.0  
   VERSION=19.11.0.0.0  
   DESCRIPTION=19c APR 2021 DB Image

20.IMAGE_TAG=19.12.0.0.0
  VERSION=19.12.0.0.0
  DESCRIPTION=19c JUL 2021 DB Image

21.IMAGE_TAG=19.13.0.0.0  
  VERSION=19.13.0.0.0  
  DESCRIPTION=19c OCT 2021 DB Image

Images can be downloaded using their image tags. For details, see help using 'dbaascli cswlib download --help'.
dbaascli execution completed

To download a software image

You can download available software images onto your Exadata Cloud Infrastructure instance by using the cswlib download subcommand of the dbaascli utility.

  1. Connect to a compute node as the opc user.For detailed instructions, see Connecting to a Virtual Machine with SSH.
  2. Start a root-user command shell:
    $ sudo -s
    #
  3. Execute the dbaascli command with the cswlib download subcommand:
    # dbaascli cswlib download [--version <software_version>] [--imageTag <image tag
        value>]
    The command displays the location of software images that are downloaded to your Exadata Cloud Infrastructure environment.

    The optional parameters are:

    • version: specifies an Oracle Database software version. For example, 19.14.0.0.0.
    • imageTag: specifies the image tag of the image.
  4. Exit the root-user command shell:
    # exit
    $

Patching Oracle Grid Infrastructure and Oracle Databases Using dbaascli

Learn to use the dbaascli utility to perform patching operations for Oracle Grid Infrastructure and Oracle Database on an Exadata Cloud Infrastructure system.

Patching Databases using dbaascli

Using dbaascli, you can choose to patch a database by patching Oracle home, or by moving the database to an Oracle home with the desired patch level.

  • Patching an Oracle home (in-place patching). This updates all databases located in the Oracle home.
  • Moving a database to a different Oracle home that has the desired Oracle Database software version (out-of-place patching).
Patching a Database Home (In-Place Database Patching)

To patch an Oracle home, use the dbaascli dbHome patch command.

This will patch all databases running in the specified home, and the databases will remain in the home after the patching is complete. The following apply to using the dbHome patch command for in-place patching operations:
  • You can patch all of your database nodes or a subset of nodes.
  • Multi-node patching takes place in a rolling fashion.
  • Optionally, you can perform a software-only patch operation. Then, when you are ready, you can run datapatch to perform post-patch SQL actions.
  • You can patch an Oracle home containing one or more databases.

To patch an Oracle Home (dbhome):

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_version
    Where:
    • --oracleHome identifies the path of the Oracle home to be patched.
    • --targetVersion specifies the target Oracle Database version to use for patching, specified as five numeric segments separated by periods (e.g. 19.12.0.0.0).
    For example:
    dbaascli dbhome patch --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --targetVersion 19.9.0.0.0
  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli dbHome patch.

Moving a Database to a Different Oracle Home (Out-of-Place Patching)

To patch an Oracle Database by moving it to an Oracle home that is already at the desired patch level, use the dbaascli database move command.

After the database move operation is complete, the database runs using the Oracle Database software version of the target Oracle Home.

To patch a database by moving it to a different Oracle Home:

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_name
    Where:
    • --oracleHome identifies the path of the target Oracle home that uses the desired Oracle Database software version. Note that the target Oracle home must exist in your system prior to using the database move command.
    • --dbname specifies the name of the database that is being moved.
    For example:
    dbaascli database move --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --dbname xyz
  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli database move.

Patching Oracle Grid Infrastructure

To apply a patch to Oracle Grid Infrastructure, use the grid patch command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli grid patch --targetVersion target_software_version_number

    Where --targetVersion identifies target software version that the Oracle Grid Infrastructure will be patched to.

    For example:
    dbaascli grid patch --targetVersion 19.11.0.0.0
  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli grid patch.

Patching Oracle Grid Infrastructure (GI) Using GI Software Image

To patch Oracle Grid Infrastructure (GI) using GI software image, use this procedure.

Oracle Grid Infrastructure can also be patched by first creating a patched software image, and then using that image to perform the patching operation. This provides the advantage that an image can be created ahead of time outside of the patching window. It also helps in conflict resolution as any conflicts among the patches are highlighted during the image creation process without impacting the patching window.

  1. Create a patched software image.
    dbaascli grid patch --targetVersion <target_software_version_number> --createImage
    Once the patched software image creation is completed, the image can then be used for performing the patching operation.
  2. Perform the patching operation.
    dbaascli grid patch --targetVersion <target_software_version_number> --imageLocation <location_of_patched_software_image>

Listing Available Software Images and Versions for Database and Grid Infrastructure

To produce a list of available supported versions for patching, use the dbaascli cswlib showImages command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli cswlib showImages --product database

    The command output lists the available database software images.

    dbaascli cswlib showImages --product grid

    The command output lists the available grid software images.

  4. Exit the root user command shell:
    exit

    For more details on advanced supported options, see dbaascli cswlib showImages.

Example 6-3 dbaascli cswlib showImages

[root@dg11lrg1 dbhome_1]# dbaascli cswlib showImages
DBAAS CLI version <version>
Executing command cswlib
      showImagesJob id: 00e89b1a-1607-422c-a920-22f44bec1953Log file location:
      /var/opt/oracle/log/cswLib/showImages/dbaastools_2022-05-11_08-49-12-AM_46941.log

############
List of Available Database Images
#############

17.IMAGE_TAG=18.17.0.0.0  
   VERSION=18.17.0.0.0  
   DESCRIPTION=18c JAN 2022 DB Image

18.IMAGE_TAG=19.10.0.0.0  
   VERSION=19.10.0.0.0  
   DESCRIPTION=19c JAN 2021 DB Image

19.IMAGE_TAG=19.11.0.0.0  
   VERSION=19.11.0.0.0  
   DESCRIPTION=19c APR 2021 DB Image

20.IMAGE_TAG=19.12.0.0.0
  VERSION=19.12.0.0.0
  DESCRIPTION=19c JUL 2021 DB Image

21.IMAGE_TAG=19.13.0.0.0  
  VERSION=19.13.0.0.0  
  DESCRIPTION=19c OCT 2021 DB Image

Images can be downloaded using their image tags. For details, see help using 'dbaascli cswlib download --help'.
dbaascli execution completed

Performing a Precheck Before Patching Databases and Grid Infrastructure

You can perform a prerequisites-checking operation (also called a "precheck") for the commands in this topic using the applicable precheck flag.

Running prechecks allows you to run only the precheck portion of the patching operation without performing actual patching. Oracle recommends running prechecks to discover software issues that could prevent successful patching.

To perform patching prechecks, first, connect to a virtual machine in your Exadata Cloud Infrastructure instance as the root user.

Precheck for Oracle Home Patching (In-Place Patching)

Use the --executePrereqs flag with the dbaascli dbhome patch command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_version --executePrereqs
    Where:
    • --oracleHome identifies the path of the Oracle home to be prechecked.
    • --targetVersion specifies the target Oracle Database version to be patched to, specified as five numeric segments separated by periods (e.g. 19.12.0.0.0).
  4. Exit the root user command shell:
    exit
Precheck for Database Move Patching (Out-of-Place Patching)

Use the --executePrereqs flag with the dbaascli database move command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_name --executePrereqs
    Where:
    • --oracleHome identifies the path of the target Oracle Home that uses the desired Oracle Database software version. Note that the target Oracle Home must exist in your system prior to using the database move command.
    • --dbname specifies the name of the database that is being moved
  4. Exit the root user command shell:
    exit
Precheck for Oracle Grid Infrastructure Patching

Use the --executePrereqs flag with the dbaascli grid patch command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the following command:
    dbaascli grid patch --targetVersion target_software_version_number --executePrereqs

    Where --targetVersion identifies target software version that the Oracle Grid Infrastructure will be patched to, specified as five numeric segments separated by periods, for example, 19.12.0.0.0

  4. Exit the root user command shell:
    exit

Resuming or Rolling Back a Patching Operation

You can resume or revert a failed patching operation. Reverting a patch is known as a rollback.

Resuming a Patch Operation

To resume a patching operation, use the --resume flag with the original patching command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the original patching command to resume a patching operation:
    For example:
    dbaascli dbhome patch --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --targetVersion 19.9.0.0.0 --resume
  4. Exit the root user command shell:
    exit
Rolling Back a Patch Operation

Use the --rollback flag with the original patching command to roll back (revert) a patching operation.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. Run the original patching command to roll back (revert) a patching operation:
    For example:
    dbaascli grid patch --targetVersion 19.11.0.0.0 --rollback
    Note

    • Resume and Rollback operations are supported for Oracle Home patching, Oracle Grid Infrastructure patching, and database move operations.
    • When resuming or rolling back a patching operation, you must run the resume or rollback command from the same node that was used to run the original patching command, and you must run the original command with the addition of the --resume or --rollback flag.
  4. Exit the root user command shell:
    exit

Collect Cloud Tooling Logs and Perform a Cloud Tooling Health Check Using dbaascli

Using the dbaascli diag command allows you to collect Guest VM dbaas tooling logs for Exadata Database Service on Dedicated Infrastructure and Exadata Database Service on Cloud@Customer systems. You can use these logs to troubleshoot issues related to dbaas tooling.

You can use the diag command to collect dbaastools logs and perform a health check on all nodes in an Exadata cluster. Note that the --waitForCompletion options is supported starting in version 22.4.1
Note

  • dbaascli diag commands must be run as the root user
  • Running the dbaascli diag collect command on a single node will collect log data for all nodes
  • We recommend running the commands documented in this topic using the --waitForCompletion option for long-running commands. Refer to the examples for sample usage.

For information on updating Exadata Cloud Tooling, see dbaascli admin updateStack.

Collecting Tooling Log Data Examples

The dbaascli dbaascli diag collect command uses the syntax shown below to collect tooling log data:

See dbaascli diag collect In the dbaascli Command Reference for syntax details

# dbaascli diag collect
DBAAS CLI version 24.1.1.0.0
Executing command diag collect
Job id: 92f33125-aa70-4ce2-94fb-64d8f1cbdc93
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_07-20-44-PM_83383.log
Loading PILOT...
Session ID of the current execution is: 10
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_07-20-48-PM_83856
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-1920/diag_cloudlogs_20231214-1920_node1.zip=a0d049b87ab9e9cec2ab7d95ded4903bac818c81c8b6a46d295e1e75f4630e19}"
}
dbaascli execution completed
# dbaascli diag collect --waitForCompletion false
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --waitForCompletion false
Job id: 5b556976-dba1-4be9-a4fe-4b58e69c1d96
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_07-23-26-PM_98107.log
Job accepted. Use "dbaascli job getStatus --jobID 5b556976-dba1-4be9-a4fe-4b58e69c1d96" to check the job status.
Note

Use the job status command to monitor progress.
# dbaascli diag collect --dbnames myOracleDatabase19cName
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --dbnames myOracleDatabase19cName
Job id: 8e1d2667-4649-4384-8610-b6348d6548ac
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_08-41-41-PM_88831.log
Loading PILOT...
Session ID of the current execution is: 12
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_08-41-45-PM_89361
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-2041/diag_cloudlogs_20231214-2041_node1.zip=9e50500089a74ca7cd8ae08550c06868e26e1cd9c52e808194256594f63397e4}"
}
dbaascli execution completed
# dbaascli diag collect --destLocation /tmp/test/
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --destLocation /tmp/test/
Job id: f992afdf-415e-4b58-ab5b-9e38f8c2079d
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_09-42-54-PM_16270.log
Loading PILOT...
Session ID of the current execution is: 14
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_09-42-58-PM_16777
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/tmp/test/diag_collect/artifacts_diag_cloudlogs_20231214-2143/diag_cloudlogs_20231214-2143_node1.zip=8a26cffcfdd72c261660d4f736c615981856e357749d90751b94f3eda19a9a70}"
}
dbaascli execution completed
# dbaascli diag collect --startTime 2023-12-05T10:00:00 --endTime 2023-12-05T11:00:00
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --startTime 2023-12-05T10:00:00 --endTime 2023-12-05T11:00:00
Job id: 70b03e50-98cc-4c2b-9684-1f82070bac88
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_09-45-17-PM_42856.log
Loading PILOT...
Session ID of the current execution is: 15
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_09-45-21-PM_43526
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-2145/diag_cloudlogs_20231214-2145_node1.zip=b44cf3bfca1ab7a1629dd83098a7772790ab949e50dbb3950f0017e427d7bd05}"
}
dbaascli execution completed
# dbaascli diag collect --nodes node1,node2
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --nodes node1,node2
Job id: fa70da09-3de6-4cc8-854c-a739b4fc2ceb
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_09-46-58-PM_55884.log
Loading PILOT...
Session ID of the current execution is: 16
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_09-47-02-PM_56418
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-2147/diag_cloudlogs_20231214-2147_node1.zip=de2805c9c6c2af2d602395a84d37747935327b73a6c73052282665a8410eb41f}"
}
# dbaascli diag collect --components dbaastools
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --components dbaastools
Job id: da941d3c-5191-4ced-b1bb-9b083fa75865
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_09-47-23-PM_68256.log
Loading PILOT...
Session ID of the current execution is: 17
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_09-47-27-PM_68729
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-2147/diag_cloudlogs_20231214-2147_node1.zip=d1f290fb42c981935e1142ec059c2dbba8be2e0a9ffebc9eea83a6336abe2eed}"
}
dbaascli execution completed
# dbaascli diag collect --objectStoreBucketUri https://objectstorage.us-phoenix-1.oraclecloud.com/p/aL-IbIKQ1j6lWNftJc2rLoLh6o9bJgbZm8z0S--BeVuXaipSEEMISrSCfFrVEolG/n/intexadatateam/b/diag_collect_test/o/
DBAAS CLI version 24.1.1.0.0
Executing command diag collect --objectStoreBucketUri https://objectstorage.us-phoenix-1.oraclecloud.com/p/aL-IbIKQ1j6lWNftJc2rLoLh6o9bJgbZm8z0S--BeVuXaipSEEMISrSCfFrVEolG/n/intexadatateam/b/diag_collect_test/o/
Job id: 028151b7-cbc4-409a-9ec6-69affe10f3bb
Session log: /var/opt/oracle/log/diag/collect/dbaastools_2023-12-14_09-51-36-PM_2963.log
Loading PILOT...
Session ID of the current execution is: 20
Log file location: /var/opt/oracle/log/diag/collect/pilot_2023-12-14_09-51-40-PM_3555
-----------------
..
---------- DIAG COLLECT PLUGIN RESULT ----------
{
  "collectedArchive with SHA256 CheckSum" : "{/var/opt/oracle/dbaas_acfs/diag_collect/artifacts_diag_cloudlogs_20231214-2151/diag_cloudlogs_20231214-2151_node1.zip=71633e13ccd06de15cb26850bb0266cf0d869e259550515c5b1fb734c487b470}"
}
dbaascli execution completed

Performing a Health Check Examples

Use dbaascli dbaascli diag healthcheck command to perform a health check on all system nodes.

See dbaascli diag healthcheck for the syntax details in the dbaascli Command Reference.

# dbaascli diag healthcheck                
DBAAS CLI version MAIN
Executing command diag healthcheck
INFO: Starting diag healthcheck
INFO: Collected diag logs at: /var/opt/oracle/dbaas_acfs/diag_cloudlogs_20210322-2246.tar.gz
# dbaascli diag healthcheck --destLocation /tmp/test
DBAAS CLI version MAIN
Executing command diag healthcheck --destLocation /tmp/test
INFO: Starting diag healthcheck
INFO: Collected diag logs at: /tmp/test/diag_cloudlogs_20210322-2250.tar.gz
# dbaascli diag healthcheck --nodes rbcl1,rbcl2                   
DBAAS CLI version MAIN
Executing command diag healthcheck --nodes rbcl1,rbcl2
INFO: Starting diag healthcheck
INFO: Collected diag logs at: /var/opt/oracle/dbaas_acfs/diag_cloudlogs_20210421-1915.tar.gz
# dbaascli diag healthcheck --objectStoreBucketUri https://objectstorage.us-phoenix-1.oraclecloud.com/p/t0Z-kRV5pSmFzqnf-y5XhaAbM4LS82epeBnulKnCr31IeHVjxI9tOkntLF2kq7fP/n/MyNamespace/b/MyParBucket/o/
DBAAS CLI version MAIN
Executing command diag healthcheck --objectStoreBucketUri https://objectstorage.us-phoenix-1.oraclecloud.com/p/t0Z-kRV5pSmFzqnf-y5XhaAbM4LS82epeBnulKnCr31IeHVjxI9tOkntLF2kq7fP/n/MyNamespace/b/MyParBucket/o/
INFO: Collected diag logs at: https://objectstorage.us-phoenix-1.oraclecloud.com/p/t0Z-kRV5pSmFzqnf-y5XhaAbM4LS82epeBnulKnCr31IeHVjxI9tOkntLF2kq7fP/n/MyNamespace/b/MyParBucket/o/diag_cloudlogs_20210421-1839.tar.gz

Updating Cloud Tooling Using dbaascli

To update the cloud tooling release for Oracle Exadata Database Service on Dedicated Infrastructure, complete this procedure.

Cloud-specific tooling is used on the Exadata Cloud Infrastructure Guest VMs for local operations, including dbaascli commands.

The cloud tooling is automatically updated by Oracle when new releases are made available. If needed, you can follow the steps below to ensure you have the latest version of the cloud-specific tooling on all of the virtual machines in the VM cluster.
Note

You can update the cloud-specific tooling by downloading and applying a software package containing the updated tools.
  1. Connect to a virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:
    sudo -s
  3. To update to the latest available cloud tooling release, run the following command:
    dbaascli admin updateStack

    The command takes care of updating the cloud tooling release on all the nodes of the cluster.

    For more details and other available options, refer to dbaascli admin updateStack --help.

Creating a Duplicate Database

Using dbaascli to Duplicate a Cloud Database

You can create a duplicate database using dbaascli. This new database can be in the same cloud region as the source region or across the regions. The following steps describe how to create a duplicate database on cloud.

Note

If a database is configured with OCI Vault for TDE encryption and you want to duplicate a database, then refer to the following sections.

Prepare for duplication

Ensure that the following prerequisites are ment:

  • Make sure that there is a network path setup to access the source database through the EZConnect string.
  • Copy the TDE wallet file (ewallet.p12 ) to the target database node. The node where you decide to run the dbaascli command.
  • Create an Oracle home on the target node if required. Oracle home version must be the same version as the source or of higher RU version.

Run prerequisite checks

To run prerequisites checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle Database duplication.

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod FILE --tdeConfigMethod FILE --executePrereqs

Duplicate the database

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod FILE --tdeConfigMethod FILE

Considerations When Using OCI Vault for the Key Management

This section is applicable only in the case of database is configured with OCI Vault for TDE encryption and you want to duplicate a database.

Duplicating a database within the same region

  • Additional prerequisite steps

    Make sure to setup OCI Vault access policies for target database nodes. Target database nodes should be able to access both source database's OCI key vault along with its new key vault (if it is decided to use separate key vault).

  • Run prerequisite checks
    dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod KMS --sourceDBKMSKeyOCID <Source Database OCI Vault key OCID> --tdeConfigMethod KMS --kmsKeyOCID <OCI Vault key OCID> --executePrereqs
  • Duplicate the database
    dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod KMS --sourceDBKMSKeyOCID <Source Database OCI Vault key OCID> --tdeConfigMethod KMS --kmsKeyOCID <OCI Vault key OCID>

    Upon successful completion of this command, the database is duplicated.

Duplicating a database across regions

  • Additional prerequisite steps
  • Run prerequisite checks
    dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod KMS --sourceDBKMSKeyOCID <Source Database OCI Vault key OCID> --tdeConfigMethod KMS --kmsKeyOCID <OCI Vault key OCID> --executePrereqs
  • Duplicate the database
    dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod KMS --sourceDBKMSKeyOCID <Source Database OCI Vault key OCID> --tdeConfigMethod KMS --kmsKeyOCID <OCI Vault key OCID>

    Upon successful completion of this command, the database is duplicated.

Duplicate an On-Premises Database

Using dbaascli, you can duplicate an on-prem database onto the cloud. This can be done with the dbaascli database duplicate command. This command creates a new database on the cloud, which is a duplicate of an on-prem database along with its data. While this process is going on, the on-prem database remains still operational. You can migrate your applications to the duplicated database on the cloud after due verification.

Prepare for duplication

The migration process includes the following prerequisites to be met.
  • Make sure that there is a network path setup to access an on-prem database from the OCI node through the EZConnect string.
  • If an on-prem database is configured with TDE, copy the TDE wallet file (ewallet.p12 ) to the OCI node, where you decide to run the dbaascli command.
  • Create an Oracle home on the OCI node if required. The Oracle home version must be the same as the source or of a higher RU version.

Verify the necessary RPMs

This process requires a minimum dbaastools RPM version of 23.3.2.0.0 but updating to the latest dbaastools rpm is always recommended.

  • To check the currently installed version, run:
    dbaascli --version
    DBAAS CLI version 23.3.2.0.0
  • To apply the latest tools RPM, as the root user, run:
    # dbaascli admin updateStack

Run the prerequisite checks

To run the prerequisite checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle Database duplication.

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --executePrereqs

Duplicate the database

Duplicate the database using the following command:

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet>

For example:

dbaascli database duplicate --sourceDBConnectionString xyzhost.oracle.com:1521/dbuniquename.oracle.com --dbName orcl --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_1 --sourceDBTDEWalletLocation /tmp/wallet_copy/tde --waitForCompletion false

Upon successful completion of this command, the database is duplicated to Cloud and ready for sanity checks for application usage. Once verification is done, application connections can be migrated to the Cloud database.

Refer to dbaascli database duplicate –help for additional configuration options.

Few considerations for migration

  • If you prefer to allocate multiple channels for RMAN duplicate, you could do so by specifying the --rmanParallelism argument.
  • Exadata Cloud Service configures database memory as Automatic Shared Memory Management (ASMM). If your on-prem database is configured with different memory management, make sure to adjust memory parameter values accordingly on the OCI side by providing values for --sgaSizeInMB and --pgaSizeInMB.
  • Verify that the on-prem database does not contain any deprecated or invalid initialization parameters.
  • Database initialization parameters related to database storage (datafile location, redo location, recovery area destination, control file multiplexing) may be changed using the --initParams argument.

    For example, to override db_create_online_log_dest value for the duplicate database: --initParams db_create_online_log_dest_1=+DATAC1,db_create_online_log_dest_2=+RECOC1

Troubleshooting the database duplication

  • dbaascli operation log file can be found under /var/opt/oracle/log/<dbname>/database/duplicate
  • One of the jobs of the duplicate is to run dbca. Its log file can be found under /u02/app/oracle/cfgtoollogs/dbca and /u02/app/oracle/cfgtoollogs/dbca/<dbuniquename>.

If the operation fails, you will have an option to resume the operation by providing the --resume argument to the same command. Alternatively, clean up the database using dbaascli database delete –dbname <dbname> –force, and then rerun the database duplicate command.

Release Notes

Review the changes made in various releases of dbaascli.

Release 24.2.1.0.0 (240530)

  • Added support for Oracle Database 23ai.
  • Improvements in backup and recovery area with Zero Data Loss Autonomous Recovery Service (ZRCV) as backup destination.
  • Various bug fixes and stability improvements.

Release 24.1.2.0.0 (240306)

  • Introduced a new optimized workflow for Data Guard operations
  • Various bug fixes and stability improvements

Release 24.1.1.0.0 (231219)

  • Various bug fixes and stability improvements

Release 23.4.1.0.0 (231102)

  • Backup and Recovery: Minimum Backup recovery window has been changed to 7 days. While obsoleting backup pieces automation considers recovery window as 7 days if it discovers any value less than 7 from the system.
  • Various bug fixes and stability improvements

Release 23.3.2.0.0 (230503)

  • Pluggable Database Operations
    • Added support to set custom key version OCID (Bring Your Own Key - BYOK) of OCI Vault during create and clone operations. For details, see respective PDB commands help.
  • Grid Infrastructure (GI) Patching
    • Enhanced the patching workflow to improve patching time, especially in environments having high number of databases.
  • Database Patching
    • Provided option to run datapatch on a specific node of cluster.
  • Various bug fixes and stability improvements

Release 23.3.1.0.0 (230712)

  • New dbaascli commands
    • dbaascli gridHome create - This command can be used to create a Grid Infrastructure home of a supported version. For details, see dbaascli gridHome create --help.
    • dbaascli system getGridHomes - This command gives details on the available Grid Infrastructure homes on the system. For details, see dbaascli system getGridHomes --help.
    • dbaascli admin updateAHF - This command can be used to update the AHF to a specified cloud certified version of AHF release. It is however recommended that AHF updates be implicitly handled by cloud automation. For details, see dbaascli admin updateAHF --help.
  • Pluggable Database Operations
    • Improvements in the area of refreshable pluggagble database lifecycle.
  • Database Backup and Recovery
    • Added support to configure backups on standby sites in case of dataguard configurations. The backups configuration are Data Guard site-specific, that is, the change of roles (for example, with Data Guard switchover operation) will not impact the backup operations of the database on primary or standby sites. Backups, if configured on primary site or stand-by site, will continue regardless of the role-change.
  • Various bug fixes and stability improvements

Release 23.2.1.0.0 (230503)

  • Database Lifecycle related improvements
    • Introduced dbaascli grid removeTCPSCert to remove expired TCPS certificates. For details, see dbaascli grid removeTCPSCert --help.
    • Added option to exclude specific PDBs during database duplicate. For details, see skipPDBs argument in dbaascli database duplicate --help.
  • Database Backup and Recovery
    • Changed the default for FILES_PER_SET to 64 for OSS backups. This can be changed with dbaascli database backup --configure. For details, see dbaascli database backup --help.
    • Archive log backups continue from the standby site after the role switchover in data guard environments.
    • For backups that are not managed by Oracle, the schedules for L0 and L1 backups are not created by default. They must be be created explicitly by using dbaascli database backup --configure command.
  • sysLens

    A framework that collects, analyzes, and reports system resource data for ExaDB-D fleets is included in 23.2.1.0.0 (235503). For more information, see Manage sysLens.

  • Various bug fixes and stability improvements

Release 23.1.2.0.0 (230305)

  • Database Lifecycle related improvements
    • Added option to create database templates (DBCA temapltes) to object store. DBCA templates can subsequently be used to create databases. For details, see dbaascli database createTemplate --help.
  • Pluggable Database Operations
    • Introduced dbaascli pdb refresh to refresh a pluggable database that was created using manual refresh option. For details, see dbaascli pdb refresh --help.
    • Added option to convert refreshable pluggable database to a regular pluggable database. For details, see dbaascli pdb open --help.
    • Creation of a refreshable pluggable database now requires existing source database user for creation of database link to the source pluggable database. For details, see dblinkUserName argument in dbaascli pdb remoteClone --help.
  • Various bug fixes and stability improvements

Release 23.1.1.0.1 (230113)

  • Database Lifecycle related improvements
    • Added support to create a duplicate database from a source database which uses OCI Vault Services for encryption key management.
  • Various bug fixes and stability improvements

Release 22.4.1.0.1 (221122)

  • Pluggable Database Operations
    • Added option to not open the PDB at the end of relocate. For details, see skipOpenPDB argument in dbaascli pdb relocate --help. After using this option, the pdb relocate can be completed by running the command using completePDBRelocate argument.
    • Added option to clean up the relocated PDB metadata/services at the source location. For details, see cleanupRelocatedPDB argument in dbaascli pdb delete --help
  • New dbaascli commands
    • dbaascli database createTemplate - This command can be used to create database templates (DBCA templates) that can subsequently be used to create databases. DBCA templates are widely used for creating a clone database with DBCA - a tool that is shipped with Oracle Database server software. For details, see dbaascli database createTemplate --help
    • Introduced dbaascli tde rotateMasterKey to rotate the master key for database encryption. For details, see dbaascli tde rotateMasterKey --help. The command dbaascli tde rotate masterkey is now deprecated.
  • Database Lifecycle related improvements
    • Added support to use dbca templates in database creation workflows. For details, see dbcaTemplateFilePath argument in dbaascli database create --help
    • Improved performance for duplicate database creation. For details on how to create duplicate database, see dbaascli database duplicate --help
    • Added support to create a duplicate database from a source database which is not TDE-encrypted.
  • TDE management
    • Introduced dbaascli tde rotateMasterKey to rotate the master key for database encryption. For details, see dbaascli tde rotateMasterKey --help. The command dbaascli tde rotate masterkey is now deprecated.
    • Revamped workflow for all TDE operations. For details, see dbaascli tde --help
  • Grid Infrastructure (GI) Patching
    • Added support to allow parallel execution of patching operation on nodes. This option needs to be carefully exercised as it results into reduced database availability.
  • Database Backup and Recovery
    • Revamped workflow for creating database from standalone backups
  • Includes AHF version 22.2.4
  • Various bug fixes and stability improvements

Release 22.3.1.1.0 (221003)

  • New dbaascli commands
    • dbaascli database getDetails - This command shows the detailed information of a given database, for example, dbname, node information, pluggable databases information, and so on. For details, see dbaascli database getDetails --help.
  • Pluggable Database Operations
    • Added support for creating pluggable databases as refreshable clone using refreshablePDB argument. For details, see dbaascli pdb remoteClone --help
  • Various bug fixes and stability improvements

Release 22.3.1.0.1 (220721)

  • New database lifecycle commands
    • dbaascli database addInstance - This command can be used to add a database instance to one of the nodes of the cluster where database is not already configured. For details, see dbaascli database addInstance --help.
    • dbaascli database deleteInstance - This command can be used to delete a database instance from one of the nodes of the cluster where database is configured. For details, see dbaascli database deleteInstance --help.
    • dbaascli database duplicate - This command can be used to create a new database from an already existing database within a cluster, or across clusters, provided network connection exists between the clusters. For details, see dbaascli database duplicate --help.
  • Cloud Software Library
    • Introduced dbaascli cswlib listLocal command to list images that are downloaded from software library locally on the system. For details, see dbaascli cswlib listLocal --help The command dbaascli dbimage list is now deprecated.
    • Introduced dbaascli cswlib deleteLocal command to delete images that are downloaded from cloud software library. For details, see dbaascli cswlib deleteLocal --help The command dbaascli dbImage purge is now deprecated.
  • The log location for the command dbaascli admin updateStack has been changed to follow the convention of other dbaascli commands. The logs can be conveniently found under /var/opt/oracle/log/admin/updateStack directory. The earlier location was /var/opt/oracle/log/tooling/Update.
  • dbaascli help is now cloud platform aware in that it will list help output for commands applicable for the cloud environment it is operating on.
  • Added support for changing TDE password in dataguard environments. For details, see dbaascli tde changePassword --help. This support is currently not available for 11.2.0.4 release.
  • Included AHF version 22.1.5.
  • Revamped workflow for database upgrade operation.
  • Revamped workflow for database home create operation.
  • Various bug fixes and stability improvements

Release 22.2.1.1.0 (220623)

  • Included AHF version 22.1.1
  • Fixed an issue where update of dbaastools rpm on the system may have resulted into database downtime with ORA-600 error
  • Various bug fixes and stability improvements

Release 22.2.1.1.0 (220609)

  • New dbaascli commands:
    • dbaascli dbHome getDatabases - This command lists all the databases running from a given database Oracle home. The output is returned in JSON format to facilitate automation. For details, see dbaascli dbHome getDatabases --help.
    • dbaascli database getPDBs - This command lists all the pluggable databases of a given container database. The output is returned in JSON format to facilitate automation. For details, see dbaascli database getPDBs --help.
    • dbaascli dbHome delete - This command deletes a given database Oracle home. For details, see dbaascli dbHome delete --help.
    • dbaascli dataguard prepareStandbyBlob - This command generates a blob file containing various files that are required on the standby site for a Data Guard environment. For details, see dbaascli dataguard prepareStandbyBlob --help.
  • Grid Infrastructure (GI) Patching:
    • New optimized workflow
    • Introduced a way to create the Grid Infrastructure (GI) software image prior to patching. This GI image can be subsequently used for performing the GI patching operation. The advantage of this approach is that it results in reduced patching window as the image is already prepared. The GI stack on the node is not brought down to create the image. For details, see createImage option in dbaascli grid patch --help
    • Introduced a way to perform the Grid Infrastructure patching through the use of user specified GI software image, created using createImage option of the dbaascli grid patch command. For details, see imageLocation option in dbaascli grid patch --help.
  • Change Password support in Data Guard environment:
    • Added support to change password in Data Guard environments. For details, see dbaascli database changePassword --help and dbaascli dataguard prepareStandbyBlob --help
  • Data Guard configuration:
    • Added support to update Data Guard Automation Attributes (in the /var/opt/oracle/dg/dg.conf file). For details, see dbaascli dataguard --help.
  • Various bug fixes and stability improvements

Release 22.2.1.0.1 (220423)

  • New dbaascli commands
    • Introduced dbaascli admin showLatestStackVersion to show the latest dbaastools version available for customers to download and install. The installation of dbaastools rpm can be performed by using the command dbaascli admin updateStack. For details see “dbaascli Command Reference” section.
  • Cloud Software Library
    • Deprecated the support for BP activation (dbaascli cswlib activateBP) as BPs (Bundle Patches) are now replaced with RUs (“Release Updates”). Cloud deployment consumes RUs in the form of software images, identified with “Image Tags”. It is therefore recommended to use image tags while interfacing with Cloud Software Library (cswlib) commands. For details, see dbaasscli cswlib download –help.
    • Eliminated the need to download Non-CDB images to create nonCDB databases. Now users can create the nonCDB database using regular images. For details, see createAsCDB option in dbaascli database create –help.
  • Non-CDB Database Creation
    • Enhanced database creation workflow to create a nonCDB database using standard database software image. For details, see createAsCDB option in dbaascli database create –help.
  • Database Home Patching
    • New optimized workflow
  • Grid Infrastructure Upgrade
    • New optimized workflow
  • Pluggable Database (PDB) Operations
    • Deletion of PDB in DataGuard environments requires explicit acknowledgement to indicate that operations necessary on standby site are completed, by passing of additional argument –allStandByPrepared. For details, see dbaascli pdb delete --help
  • Provided rolling capability for database bounce operation. For details, see dbaascli database bounce –help.
  • Various bug fixes and stability improvements

Release 22.1.1.2.0 (220405)

  • Added support for ExaDB-D X9M
  • Various bug fixes and stability improvements

Release 22.1.1.1.0 (220317)

  • New dbaascli commands:
    • Introduced dbaascli system getDBHomes to get all the database Oracle homes on the cluster. The output is returned in JSON format to facilitate automation.
    • Introduced dbaascli dbhome getDetails to get detailed information on a specific Oracle home. The output is returned in JSON format to facilitate automation.
  • Cloud Software Library (cswlib):
    • Deprecated the support for dbaascli cswlib list command for cloud software library listing operations. The new command is dbaascli cswlib showImages that lists the images along with its of ImageTag. It is recommended to use Image tags to download the images from the cloud software library. For details on downloads using image tags, see dbaascli cswlib download –help.
    • Various bug fixes and stability improvements

Release 22.1.1.0.1 (220223)

  • Grid Infrastructure Upgrade
    • New optimized workflow
  • Database Backup And Recovery
    • Internal update to metadata repository for backup metadata
    • Introduced deprecation messages for bkup_api commands as they are now replaced with dbaascli commands. For details, see ‘dbaascli database backup --help’ and ‘dbaascli database recover –help’
  • Pluggable Database (PDB) Operations
    • Relocate operation of PDB is now supported. For details, see ‘dbaascli pdb relocate –help’.
    • Revamped workflow for nonCDB to PDB conversion. For details, see ‘dbaascli database convertToPDB –help’.
  • Encryption Key Management
    • Transparent Data Encryption (TDE) heartbeat specific initialization parameters are set to the cloud recommended values for databases with 'Customer Managed Keys'.
  • Cloud Software Library Management
    • Revamped software library download of artifacts through imageTags. It is recommended to use imageTags to download the database and grid software images. For details, see ‘dbaascli cswlib showimages’ and ‘dbaascli cswlib download –help’
  • Included AHF version 21.4.2
  • Various bug fixes and stability improvements

Release 21.4.1.1.0 (220209)

  • Included AHF version 21.4.1
  • Bug fixes and stability improvements

Release 21.4.1.1.0

  • Enabled encryption of the system level tablespaces (SYSTEM, SYSAUX, UNDO, and TEMP) for databases that will get created with this version of dbaastools onwards. This feature is enabled for Oracle Database version 19.6.0.0.0 and above.
  • Grid Patching:
    • Prerequisite condition added to check for following file ownership to be owned by grid user.
      • <gi_home>/suptools/tfa/release/tfa_home/jlib/jdev-rt.jar
      • <gi_home>/suptools/tfa/release/tfa_home/jlib/jewt4.jar
  • Database Patching:
    • Simultaneous database move operation is disallowed by default. A new option –allowParallelDBMove is introduced that can be used to override the default behavior for Oracle Database releases 12.2 and above.
    • Fixed issues related to move of standby databases being in MOUNT mode.
  • Database Backup and Recovery:
    • Added new command-line options for database backup. For more details, refer to dbaascli database backup command reference.
    • Added new command-line options for database recovery. For more details, refer to dbaascli database recover command reference.
    • bkup_api usage for backup and recovery operations will be deprecated in future.
    • To align with the Oracle recommended practice of using SYSBACKUP administrative privilege for Backup and Recovery operations, cloud automation creates a common administrative user C##DBLCMUSER with SYSBACKUP role at the CDB$ROOT container level. Backup and Recovery operations are therefore performed with the user having the least required privileges. Credentials for this user are randomly generated and securely managed by cloud automation. If the user is not found or is LOCKED and EXPIRED, then cloud automation will recreate or unlock this user during the backup or recovery operation. This change in the cloud automation is made starting with dbaastools version 21.4.1.1.0.
  • Enhanced dbaascli resume functionality to resume any previous session by specifying the –sessionID <value> argument to the resume command. The session ID is shared in the dbaascli output as well as in the logs.
  • Enhanced dbaascli help output to show the command usage.
  • Deprecated the usage of dbaascli shell (interactive session). This will be completely unsupported after March 2022. It is recommended to execute complete dbaascli commands on command prompt as suggested in all document examples.
  • Included Autonomous Health Framework (AHF) version 21.2.8.
  • Various bug fixes and stability improvements.

Release 21.3.1.2.0

  • Improved the timing of dbaascli operations with enhanced Control Plane metadata synchronization logic.
  • Enhanced dbaascli logs to have millisecond-level information along with the associated thread.
  • Introduced more prerequisite checks in database home patching and database move operations to catch potential failures scenarios with suggestions to corrective action.
  • Database patching operations now retain the state of the databases to be same as it was prior to patching. For pluggable databases, pdb saved state is honored.
  • Various bug fixes and stability improvements.

Release 21.3.1.1.0

  • Added support to unlock PDB Admin user account as part of PDB creation, localClone, or remoteClone operation. For details, see option --lockPDBAdminAccount in dbaascli pdb create --help.
  • Fixed an issue that updates the database resource registered with Oracle Grid Infrastructure in existing environments with the correct value of database name.
  • Enhanced PDB lifecycle operations.
  • Various bug fixes and stability improvements.

Release 21.3.1.0.1

  • Support for the following dbaascli commands to be run as oracle user.
    • dbaascli pdb bounce
    • dbaascli pdb close
    • dbaascli pdb connectString
    • dbaascli pdb create
    • dbaascli pdb delete
    • dbaascli pdb getDetails
    • dbaascli pdb list
    • dbaascli pdb localClone
    • dbaascli pdb open
    • dbaascli pdb remoteClone
  • Revamped out-of-place patching of database. For details, see dbaascli database move –help.
  • Timing related enhancements in Oracle Grid Infrastructure patching workflow. For details, see dbaascli grid patch –help.
  • Deprecated the support for exadbcpatchmulti / dbaascli patch for patching operations. The dbaascli dbhome patch and dbaascli grid patch commands are provided for patching operation for database homes and Oracle Grid Infrastructure. Refer to the Patching Oracle Grid Infrastructure and Oracle Database Using dbaascli section for details. Also see, dbaascli Command Reference section.
  • Deprecated the support for dbaascli tools patch command to bring consistency in the dbaascli command conventions. The new command is dbaascli admin updateStack. For details, see section Updating Cloud Tooling using dbaascli.
  • Ability to run dbaascli in disconnected mode for long running operations. Executing dbaascli command with --waitForCompletion false gets you a job ID that can be queried later to get the status of the operation, using dbaascli job getStatus –jobid job_id. This is useful for long running operations where users may want to get the control back immediately after command execution. In this release, this option is available only for dbaascli database create command. More commands will be added in subsequent releases to have this support. The help output for those commands will reflect the support of --waitForCompletion option.
  • Deprecated the support for dbaascli shell. It is recommended that users run the complete dbaascli commands on the command prompt as suggested in all the document examples. Execution of just dbaascli will show the output of its usage help instead of entering into a dbaascli shell.
  • Various bug fixes and stability improvements.

Release 21.2.1.x.x

  • Redesigned Oracle Grid Infrastructure patching operation and added ability to resume from failed point, patch on subset of nodes, instance draining, and other enhancements. For details, see dbaascli grid patch --help. Also refer to the Patching Oracle Grid Infrastructure and Oracle Database Using dbaascli section.
  • Deprecated the support for exadbcpatchmulti / dbaascli patch for patching operations. dbaascli dbhome patch and dbaascli grid patch commands are provided for patching operation for database homes and Oracle Grid Infrastructure. Refer to the Patching Oracle Grid Infrastructure and Oracle Database Using dbaascli section for details. Also see, dbaascli Command Reference section.
  • Deprecated the support for dbaascli tools patch command to bring consistency in the command conventions. The new command is dbaascli admin updateStack.
  • Redesigned PDB management APIs for create, local clone, and remote clone operations. For details, see dbaascli pdb --help.
  • Redesigned database delete API. For details, see dbaascli database delete --help.
  • Revamped dbhome creation (support for custom software image, scale-out operation). For details, see dbaascli dbhome create --help.
  • Support for database creation on subset of cluster nodes. For details, see dbaascli database create --help.
  • Ability to run dbaascli in disconnected mode for long running operations. Executing dbaascli command with --waitForCompletion false gets you a job ID that can be queried later to get the status of the operation, using dbaascli job getStatus –jobid job_id. This is useful for long running operations where users may want to get the control back immediately after command execution. In this release, this option is available only for dbaascli database create command. More commands will be added in subsequent releases to have this support. The help output for those commands will reflect the support of --waitForCompletion option.
  • Enhanced dbhome patching experience with introduction of multiple options like skipPDBs, continueWithDowntime, and so on. For details, see dbaascli dbhome patch --help.
  • Support for better diagnostic collection. For details, see dbaascli diag collect --help.
  • Minor improvements in the area of database upgrade automation.
  • Various bug fixes and stability improvements.

dbaascli Command Reference

You must use dbaascli to create databases and integrate them with the cloud automation framework.

dbaascli is a cloud native interface that can take DBCA templates as inputs, calls the functionality of DBCA to create databases, and then calls OCI APIs to integrate the database into the cloud automation framework. Customers using DBCA in scripts today can update their existing scripts to call dbaascli instead of DBCA. If dbaascli cannot be used due to a particular feature of DBCA being unavailable in dbaascl, then customers should open a My Oracle Support (MOS) request to add that functionality to dbaascli.

To use the dbaascli utility, you must be connected to an Exadata Cloud Infrastructure compute node. See Connecting to an Exadata Cloud Infrastructure Instance for instructions.

Some dbaascli commands can be run as the oracle or the opc user, but many commands require root administrator privileges. Refer to each command for specific requirements.

dbaascli admin updateAHF

To install or update Autonomous Health Framework (AHF), use the dbaascli admin updateAHF command.

Prerequisites

Run the command as the root user.

Syntax

dbaascli admin updateAHF
 {
   --targetVersion value | --imageTag value
}
[--resume [--sessionID value]] [--executePrereqs]
Where:
  • --targetVersion specifies the target version to update AHF to
  • --imageTag specifies the image tag of the AHF artifact to be installed
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --executePrereqs runs prerequisite checks and reports the results

dbaascli admin updateStack

To install or update a dbaastools RPM, use the dbaascli admin updateStack command.

Prerequisites

Run the command as the root user.

To use the utility, you must connect to an Exadata Cloud Infrastructure virtual machine.

See, Connecting to a Virtual Machine with SSH.

Syntax

dbaascli admin updateStack 
[--resume]
[--prechecksOnly]
[--nodes]
Where:
  • --resume resumes the previous execution
  • --prechecksOnly runs only the prechecks for this operation
  • --nodes specifies a comma-delimited list of nodes to install the RPM on. If you do not pass this argument, then the RPM will be installed on all of the cluster nodes

dbaascli cswlib deleteLocal

To delete the local image, use the dbaascli cswlib deleteLocal command.

Run the command as the root user.

Syntax

dbaascli cswLib deleteLocal --imageTag <value>

Where:

  • --imageTag specifies Oracle home image tag

Example 6-4 dbaascli cswlib deletelocal

dbaascli cswlib deletelocal --imagetag 19.15.0.0.0
DBAAS CLI version MAIN
Executing command cswlib deletelocal --imagetag 19.15.0.0.0
Job id: 8b3e71de-4b81-4832-b49c-7f892179bb4f
Log file location: /var/opt/oracle/log/cswLib/deleteLocal/dbaastools_2022-07-18_10-00-02-AM_73658.log
dbaascli execution completed

dbaascli cswlib download

To download available software images and make them available in your Exadata Cloud Infrastructure environment, use the dbaascli cswlib download command.

Prerequisites

Run the command as the root user.

To use the utility, you must connect to an Exadata Cloud Infrastructure virtual machine.

See, Connecting to a Virtual Machine with SSH.

Syntax

dbaascli cswlib download --version | --imageTag
[--product]
Where:
  • --version specifies an Oracle home image version
  • --imageTag specifies the image tag of the image
  • --product specifies the image type. Valid values: database or grid

Example 6-5 dbaascli cswlib download --product --imageTag

dbaascli cswlib download --product database --imageTag 19.14.0.0.0

Example 6-6 dbaascli cswlib download --version 19.9.0.0.0

dbaascli cswlib download --product database --imageTag 19.14.0.0.0

dbaascli cswlib listLocal

To view the list of locally available Database and Grid Infrastructure images, use the dbaascli cswlib listLocal command.

Run the command as the root user.

Syntax

dbaascli cswLib listLocal [--product <value>]

Where:

  • --product identifies Oracle home product type. Valid values: database or grid.

Example 6-7 dbaascli cswlib listlocal

dbaascli cswlib listlocal
DBAAS CLI version MAIN
Executing command cswlib listlocal
Job id: bc4f047c-0a34-4d4d-a1ea-21ddc2a9c627
Log file location: /var/opt/oracle/log/cswLib/listLocal/dbaastools_2022-07-18_10-29-53-AM_16077.log
############ List of Available Database Images  #############
1.IMAGE_TAG=12.2.0.1.220419
  IMAGE_SIZE=5GB
  VERSION=12.2.0.1.220419
  DESCRIPTION=12.2 APR 2022 DB Image
2.IMAGE_TAG=18.16.0.0.0
  IMAGE_SIZE=6GB
  VERSION=18.16.0.0.0
  DESCRIPTION=18c OCT 2021 DB Image
3.IMAGE_TAG=19.14.0.0.0
  IMAGE_SIZE=5GB
  VERSION=19.14.0.0.0
  DESCRIPTION=19c JAN 2022 DB Image
dbaascli execution completed

dbaascli cswlib showImages

To view the list of available Database and Grid Infrastructure images, use the dbaascli cswlib showImages command.

Run the command as the root user.

Syntax

dbaascli cswlib showImages 
[--product]

Where:

  • --product identifies Oracle home product type. Valid values: database or grid.

Example 6-8 dbaascli cswlib showImages

dbaascli cswlib showImages

dbaascli database addInstance

To add the database instance on the specified node, use the dbaascli database addInstance command.

Prerequisite

  • Run the command as the root user.

Syntax

dbaascli database addInstance --dbname <value> --node <value> [--newNodeSID <value>]
Where:
  • --dbname specifies Oracle Database name
  • --node specifies the node name for the database instance
    • --newNodeSID specifies SID for the instance to add in the new node

dbaascli database backup

To configure Oracle Database with a backup storage destination, take database backups, query backups, and delete a backup, use the dbaascli database backup command.

Prerequisite

  • Run the command as the root user.

Syntax

dbaascli database backup --dbname <value>
        {
            --list
                {
                    [--backupType <value>]
                    | [--json <value>]
                }
            | --start [--level0] [--level1]
                {
                    [--archival --tag <value>]
                    | [--archivelog]
                }
            | --delete --backupTag <value>
            | --status --uuid <value>
            | --getBackupReport
                {
                    --tag <value>
                    | --latest
                }
                --json <value>
            | --configure
                {
                    --configFile <value>
                    | --enableRTRT
                    | --disableRTRT
                }
            | --getConfig [--configFile <value>]
            | --validate [--untilTime <value>]
            | --showHistory [--all]
        }
Where:
--dbname: Oracle Database name.
--list | --start | --delete | --status | --getBackupReport | --configure | --getConfig
--list: Returns database backup information.
    [--json: Specify the file name for JSON output.]
--start: Begins database backup.
        [--level0 | --level1 | --archival]
        [--level0: Creates a Level-0 (full) backup. ]
        [--level1: Creates a Level-1 (incremental) backup. ]
        [--archival: Creates an Archival full backup. ]
             --tag: Specify backup tag.
--delete: Deletes Archival backup.
            --backupTag <value>
--status
            --uuid <value>
--getBackupReport: Returns backup report.
            --tag: Specify backup tag.
            --latest: Returns latest backup report (all types of database backup).
            --json: Specify the file name for JSON output.
--configure: Configures database for backup.
            --configFile | --enableRTRT | --disableRTRT
            --configFile: Specify database backup configuration file.
            --enableRTRT: Enables Real Time Redo Transport.
            --disableRTRT: Disables Real Time Redo Transport.
--getConfig: Returns database backup configuration.
            [--configFile: Specify the database backup configuration file.]
--validate: Validates that backups are complete and corruption-free.
            [--untilTime: Validates from closest Level-0 (full) backup until time provided. Input format: DD-MON-YYYY HH24:MI:SS.]
--showHistory: Displays the history of backup operations.
            [--all: Displays all backup operations.]
Note

enableRTRT and disableRTRT are applicable only for ZDLRA backup destination on Exadata Database Service on Cloud@Customer.

Example 6-9 Examples

  • To change the archive log retention period follow the below steps:
    dbaascli database backup --getConfig --dbname <dbname>

    This will generate a backup config file .cfg.

    Update bkup_archlog_fra_retention value in this config file.

    Run the configure command:

    dbaascli database backup --configure --dbname <dbname> --configfile <config file generated above>
  • To get backup configuration for a database myTestDB:
    dbaascli database backup --dbName myTestDB --getConfig --configFile /tmp/configfile_1.txt
  • To set backup configuration for a database myTestDB by modifying the config file with configuration details:
    dbaascli database backup --dbName myTestDB --configure --configFile /tmp/configfile_1_modified.txt
  • To take backup of the database myTestDB:
    dbaascli database backup --dbName myTestDB --start
  • To query the status of backup request submitted with uuid 58fdcae0bd1c11eb92bc020017075151:
    dbaascli database backup --dbName myTestDB --status --uuid 58fdcae0bd1c11eb92bc020017075151
  • To enable RTRT for the database myTestDB:
    dbaascli database backup --dbName myTestDB --configure —enableRTRT

dbaascli database bounce

To shut down and restart a specified Exadata Cloud Infrastructure database, use the dbaascli database bounce command.

Prerequisites

Run the command as the oracle user.

Syntax

dbaascli database bounce
[--dbname][--rolling <value>]
Where:
  • --dbname specifies the name of the database
  • --rolling specifies true or false to bounce the database in a rolling manner. Default value is false.

The command performs a database shutdown in immediate mode. The database is then restarted and opened. In Oracle Database 12c or later, all of the PDBs are also opened.

Example 6-10 dbaascli database bounce

dbaascli database bounce --dbname dbname

dbaascli database changepassword

To change the password of a specified Oracle Database user, use the dbaascli database changePassword command. When prompted enter the user name for which you want to change the password and then enter the password.

Prerequisites

Run the command as the root or oracle user.

Syntax

dbaascli database changePassword [--dbname <value>] [--user <value>]
{
  [--prepareStandbyBlob <value> [--blobLocation <value>]] | [--standbyBlobFromPrimary <value>]
}
[--resume [--sessionID <value>]]
Where:
  • --dbname specifies the name of the Oracle Database that you want to act on
  • --user specifies the user name whose password change is required
  • --prepareStandbyBlob specifies true to generate a blob file containing the artifacts needed to change the password in a Data Guard environment. Valid values: true|false
  • --blobLocation specifies the custom path where blob file will be generated
  • --standbyBlobFromPrimary specifies the standby blob file, which is prepared from the primary database
  • --resume specifies to resume the previous execution
    • --sessionID specifies to resume a specific session ID

Example 6-11 dbaascli database changePassword

dbaascli database changepassword --dbname db19

dbaascli database convertToPDB

To convert the specified non-CDB database to PDB, use the dbaascli database convertToPDB command.

Syntax

dbaascli database convertToPDB --dbname <value> [--cdbName <value>] [--executePrereqs]
        {
            [--copyDatafiles [--keepSourceDB]]|[backupPrepared]
        }
        [--targetPDBName <value>] [--waitForCompletion <value>] [--resume [--sessionID <value>]]
Where:
  • --dbname specifies the name of Oracle Database
  • --cdbName specifies the name of the target CDB in which the PDB will be created. If the CDB does not exist, then it will be created in the same Oracle home as the source non-CDB
  • --executePrereqs specifies to run only the pre-conversion checks
  • --copyDatafiles specifies to create a new copy of the data files instead of using the ones from the source database

    --keepSourceDB - to preserve the source database after completing the operation.

  • --backupPrepared - flag to acknowledge that a proper database backup is in place for the non CDB prior to performing the conversion to PDB.
  • --backupPrepared flag to acknowledge that a proper database backup is in place for the non-CDB prior to performing the conversion to PDB
  • --targetPDBName specifies the name of the PDB that will be created as part of the operation
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true|false
  • --resume specifies to resume the previous execution
    • --sessionID specifies to resume a specific session ID

Example 6-12 dbaascli database convertToPDB

To run pre-conversion prechecks:
dbaascli database convertToPDB --dbname ndb19 --cdbname cdb19 --backupPrepared --executePrereqs
To run a full conversion with a copy of the data files from the non-CDB:
dbaascli database convertToPDB --dbname tst19 --cdbname cdb19 --copyDatafiles

dbaascli database create

To create Oracle Database, use the dbaascli database create command. When prompted, enter the sys and tde passwords.

Use this command to create Oracle Database version 12.1.0.2 or higher with the release update JAN 2021 or higher. For databases with lower versions, it is recommended to use the OCI Console based API.

Prerequisite

Run the command as the root user.

Syntax

dbaascli database create --dbName {--oracleHome | --oracleHomeName}
[--dbUniqueName <value>]
[--dbSID <value>]
[--createAsCDB <value>]
[--pdbName <value>]
[--pdbAdminUserName <value>]
[--dbCharset <value>]
[--dbNCharset <value>]
[--dbLanguage <value>]
[--dbTerritory <value>]
[--sgaSizeInMB <value>]
[--pgaSizeInMB <value>]
[--datafileDestination <value>]
[--fraDestination <value>]
[--fraSizeInMB <value>]
[--nodeList <value>]
[--tdeConfigMethod <value>]
[--kmsKeyOCID <value>]
{
            [--resume [--sessionID <value>]]
            | [--revert [--sessionID <value>]]
        }
[--executePrereqs]
[--honorNodeNumberForInstance <value>]
[--lockPDBAdminAccount <value>]
[--dbcaTemplateFilePath <value>]
[--waitForCompletion]
Where:
  • --dbname specifies the name of the database
  • --oracleHome specifies the location of the Oracle home
  • --oracleHomeName specifies the name of the Oracle home
  • --dbUniqueName specifies database unique name
  • --dbSID specifies the SID of the database
  • --createAsCDB specify true or false to create database as CDB or Non-CDB
  • --pdbName specify PDB name
  • --pdbAdminUserName specify PDB admin user name
  • --dbCharset specifies database character set
  • --dbNCharset specifies database national character set
  • --dbLanguage specifies the database language
  • --dbTerritory specifies the database territory
  • --sgaSizeInMB specifies the sga_target value in megabyte unit
  • --pgaSizeInMB specifies the pga_aggregate_target value in megabyte unit
  • --datafileDestination specifies the ASM disk group name to use for database datafiles
  • --fraDestination specifies ASM disk group name to use for database Fast Recovery Area
  • --fraSizeInMB specifies the Fast Recovery Area size value in megabyte unit
  • --nodeList specifies a comma-delimited list of nodes for the database
  • --tdeConfigMethod specifies TDE configuration method. Valid values: FILE, KMS
  • --kmsKeyOCID specifies KMS key OCID to use for TDE. This is applicable only if KMS is selected for TDE
  • --resume resumes the previous execution
  • --revert rolls back the previous run
  • --sessionID to resume or revert a specific session id.
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes or no
  • --honorNodeNumberForInstance specifies true or false to indicate instance name to be suffixed with the cluster node numbers. Default value: true
  • --lockPDBAdminAccount specify true or false to lock the PDB admin user account. Default value is true
  • --dbcaTemplateFilePath specify the absolute path of the dbca template name to create the database.
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false

Example 6-13 dbaascli database create

dbaascli database create --dbName db19 --oracleHomeName myhome19 --dbSid db19sid --nodeList node1,node2 --createAsCDB true

dbaascli database delete

To delete an Oracle Database, use the dbaascli database delete command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli database delete --dbname <value>
[--deleteArchiveLogs <value>]
[--deleteBackups <value>]
[--precheckOnly <value>]
[--waitForCompletion <value>]
[--force]
[--dbSID <value>]
[--resume [--sessionID <value>]]
Where:
  • --dbname specifies the name of the database.
  • --deleteArchiveLogs specifies true or false to indicate deletion of database archive logs.
  • --deleteBackups specifies true or false to indicate deletion of database backups.
  • --precheckOnly specifies yes to run only the prechecks for this operation. Valid values: yes or no.
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false.
  • –-force flag to force delete database.
  • --dbSID specify database SID.
  • --resume to resume the previous execution.
  • --sessionID to resume a specific session id.

Example 6-14 dbaascli database delete

dbaascli database delete --dbname db19

dbaascli database deleteInstance

To delete the database instance on the specified node, use the dbaascli database deleteInstance command.

Prerequisite

  • Run the command as the root user.

Syntax

dbaascli database deleteInstance --dbname <value> --node <value> [--continueOnUnreachableNode]
Where:
  • --dbname specifies Oracle Database name
  • --node specifies the node name for database instance
  • --continueOnUnreachableNode specifies to perform the operation even if the node is unreachable

Example 6-15 database deleteinstance

database deleteinstance --node test-node

dbaascli database duplicate

To create a database from an active database, use the dbaascli database duplicate command.

Prerequisite

  • Run the command as the root user.

Syntax

dbaascli database duplicate --dbName <value> --sourceDBConnectionString <value>
        {
            --oracleHome <value>
            | --oracleHomeName <value>
        }
[--dbSID <value>] 
[--dbUniqueName <value>] 
[--sgaSizeInMB <value>] 
[--pgaSizeInMB <value>] 
[--datafileDestination <value>] 
[--fraDestination <value>] 
[--fraSizeInMB <value>] 
[--sourceDBWalletLocation <value>] 
[--nodeList <value>]
        {
            [--resume [--sessionID <value>]]
            | [--revert [--sessionID <value>]]
        }
[--rmanParallelism <value>]
[--rmanSectionSizeInGB <value>]
[--tdeConfigMethod <value>]
[--kmsKeyOCID <value>]
[--sourceDBTdeConfigMethod <value>]
[--sourceDBKmsKeyOCID <value>]
[--executePrereqs <value>] 
[--waitForCompletion <value>]
[--skipPDBs <value>]
Where:
  • --dbName specifies Oracle Database name
  • --sourceDBConnectionString specifies source database connection string in the format of <scan_name>:<scan_port>/<database_service_name>
  • --oracleHome specifies Oracle home location
  • --oracleHomeName specifies Oracle home name
  • --dbSID specifies database SID
  • --dbUniqueName specifies database unique name
  • --sgaSizeInMB specifies sga_target value in mega byte unit
  • --pgaSizeInMB specifies pga_aggregate_target value in mega byte unit
  • --datafileDestination specifies ASM disk group name to use for database datafiles
  • --fraDestination specifies ASM disk group name to use for database fast recovery area
  • --fraSizeInMB specifies fast recovery area size value in mega byte unit
  • --sourceDBWalletLocation specifies source database TDE wallet file location. This is required to duplicate database from active database
  • --nodeList specifies a comma-delimited list of nodes for the database
  • --resume specifies to resume the previous execution
    • --sessionID specifies to resume a specific session ID
  • --revert specifies to rollback the previous execution
    • --sessionID specifies to rollback a specific session ID
  • --rmanParallelism specifies parallelsim value
  • --rmanSectionSizeInGB specifies RMAN section size in GB
  • --tdeConfigMethod specifies TDE configuration method. Allowed values are FILE and KMS.
  • --kmsKeyOCID specifies KMS key OCID to use for TDE. This is applicable only if KMS is selected for TDE.
  • --sourceDBTdeConfigMethod specifies source database TDE configuration method. Allowed values are FILE and KMS.
  • --sourceDBKmsKeyOCID specifies source database KMS key OCID to use for TDE. This is applicable only if KMS is selected for TDE.
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes|no
  • --waitForCompletion specifies false to run the operation in background. Valid values: true|false
  • --skipPDBs specifies a comma-delimited list of source database PDB names, which needs to be excluded for the duplicate database operation. Example: pdb1,pdb2...

Example 6-16 dbaascli database duplicate

dbaascli database duplicate --sourceDBConnectionString test-user-scan.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com:1521/mynew.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --dbName newdup --sourceDBWalletLocation /var/opt/oracle/dbaas_acfs/tmp/prim_wallet

dbaascli database getDetails

This command shows the detailed information of a given database e.g. dbname, node information, pluggable databases information etc.

Prerequisites

Run the command as the root user or the oracle user

Syntax

dbaascli database getDetails --dbname <value>
Where :
  • --dbname - Oracle database name.

dbaascli database getPDBs

To view the list of all pluggable databases in a container database, use the dbaascli database getPDBs command.

Run the command as the root or oracleuser.

Syntax

dbaascli database getPDBs --dbname <value>
Where:
  • --dbname specifies the name of the container database

Example 6-17 dbaascli database getPDBs --dbname

dbaascli database getPDBs --dbname apr_db1

dbaascli database modifyParameters

To modify or reset initialization parameters for an Oracle Database, use the dbaascli database modifyParameters command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli database modifyParameters --dbname <value> --setParameters <values>| --resetParameters <values> | --responseFile
[--backupPrepared]
[--instance]
[--allowBounce]
Where:
  • --dbname specifies the name of the database.
  • --setParameters specifies a comma-delimited list of parameters to modify with new values. For example: parameter1=valueA,parameter2=valueB, and so on. For blank values use parameter1=valueA,parameter2='',etc.
  • --resetParameters specifies a comma-delimited list of parameters to be reset to their corresponding default values. For example, parameter1,parameter2, and so on.
  • --responseFile specifies the absolute location of the response JSON file to modify the database parameters
  • --backupPrepared acknowledges that a proper database backup is in place prior to modifying critical or sensitive parameters.
  • --instance specifies the name of the instance on which the parameters will be processed. If not specified, then the operation will be performed at the database level.
  • --allowBounce grants permission to bounce the database in order to reflect the changes on applicable static parameters.

Example 6-18 dbaascli database modifyParameters

dbaascli database modifyParameters --dbname dbname --setParameters "log_archive_dest_state_17=ENABLE"

dbaascli database move

To move the database from one home to another, use the dbaascli database move command.

Prerequisites

  • Before performing a move operation, ensure that all of the database instances associated with the database are up and running.
  • Run the command as the root user.

Syntax

dbaascli database move
{
  --oracleHome <value> | --oracleHomeName <value>
}
--dbname <value> 
[--executePrereqs] 
[--resume [--sessionID <value>]] 
[--rollback [--sessionID <value>]] 
[--skipDatapatch] 
[--skipPDBs <value>] 
[--skipClosedPDBs] 
[--continueWithDbDowntime] 
[--allowParallelDBMove] 
[--waitForCompletion <value>] 
[--nodeList <value>]

Where:

  • --oracleHome specifies Oracle home path
  • --oracleHomeName specifies the name of Oracle home
  • --dbname specifies the name of the database
  • --executePrereqs runs the prerequisite checks and report the results
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --rollback rolls the database back to previous home
    • --sessionID specifies to resume a specific session ID
  • --skipDatapatch skips running the datapatch on the databases
  • --skipPdbs skips running the datapatch on a specified comma-delimited list of PDBs. For example: pdb1,pdb2...
  • --skipClosedPDBs skips patching closed PDBs
  • --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.
  • --allowParallelDBMove allows database move in parallel.
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true|false
  • --nodeList specifies a comma-delimited list of nodes if operation has to be performed on a subset of nodes

Example 6-19 dbaascli database move

dbaascli database move --dbname testdb1 --oracleHome /u02/app/oracle/product/12.1.0/dbhome_2

dbaascli database recover

To recover a database, use the dbaascli database recover command.

Prerequisite

  • Run the command as the root user.
  • Database must have been configured with backup storage destination details where backups are stored.

Syntax

dbaascli database recover --dbname <value>
        {
            --start
                {
                    --untilTime <value>
                    | --untilSCN <value>
                    | --latest
                    | --tag <value>
                }
            | --status --uuid <value>
        }
Where:
--dbname: Oracle Database name.
      --start | --status
--start: Begins database recovery.
      --untilTime | --untilSCN | --latest | --tag
      --untilTime: Recovers database until time. Input format: DD-MON-YYYY HH24:MI:SS.
      --untilSCN: Recovers database until SCN.
      --latest: Recovers database to last known state.
      --tag: Recovers database to archival tag.
--status
      --uuid <value>

Example 6-20 Examples

  • To recover the database myTestDb to latest:
    dbaascli database recover --dbname myTestDb --start --latest
  • To query the status of recovery request submitted with uuid 2508ea18be2911eb82d0020017075151:
    dbaascli database recover --dbname myTestDb --status --uuid 2508ea18be2911eb82d0020017075151

dbaascli database runDatapatch

To patch an Oracle Database, use the dbaascli database runDatapatch command.

Prerequisites

  • Before performing a runDatapatch operation, ensure that all of the database instances associated with the database are up and running.

  • Run the command as the root user.

Syntax

dbaascli database runDatapatch --dbname
[--resume]
    [--sessionID]
[--skipPdbs | --pdbs]
[--executePrereqs]
[--patchList]
[--skipClosedPdbs]
[--rollback]

Where:

  • --dbname specifies the name of the database
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --skipPdbs skips running the datapatch on a specified comma-delimited list of PDBs. For example: pdb1,pdb2...
  • --pdbs runs the datapatch only on a specified comma-delimited list of PDBs. For example: pdb1,pdb2...
  • --executePrereqs runs prerequisite checks
  • --patchList applies or rolls back the specified comma-delimited list of patches. For example: patch1,patch2...
  • --skipClosedPdbs skips running the datapatch on closed PDBs
  • --rollback rolls back the patches applied
dbaascli database runDatapatch --dbname db19

dbaascli database createTemplate

Use this command to create database templates (DBCA templates) that can subsequently be used to create databases.

Run the command as the root or oracle user.

Syntax

Create a new DBCA template from the specified database.

dbaascli database createTemplate --dbname <value>
 {
   --templateLocation <value> | --uploadToObjectStorage --objectStorageLoginUser <value> --objectStorageBucketName <value> [--objectStorageUrl <value>]
 }
 [--templateName <value>] [--rmanParallelism <value>]
Where:
  • --dbname specifies the name of the database
  • --templateLocation specifies the template name
  • --uploadToObjectStorage: specifies to upload the template to Object Storage
    • --objectStorageLoginUser: specifies the Object Storage login user
    • --objectStorageBucketName: specifies the Object Storage bucket name
    • --objectStorageUrl: specifies the Object Storage URL
  • --templateName: specifies the name of the template
  • --rmanParallelism specifies the parallelsim value

dbaascli database start

To start an Oracle Database, use the dbaascli database start command.

Prerequisites

Run the command as the root user.

Syntax

dbaascli database start
[--dbname]
[--mode]
Where:
  • --dbname specifies the name of the database
  • --mode specifies mount or nomount to start database in the corresponding mode

The command starts and opens the database. In Oracle Database 12c or later, all of the PDBs are also opened.

Example 6-21 dbaascli database start

dbaascli database start --dbname dbname --mode mount

dbaascli database status

To check the status of an Oracle Database, use the dbaascli database status command.

Prerequisites

Run the command as the root user.

Syntax

dbaascli database status
[--service][--dbname] 
[--user]
[--password]
Where:
  • --service specifies the name of the service
  • --dbname specifies the name of the database
  • --user specifies the user name of the service
  • --password specifies the password of the user

Output from the command includes the open mode of the database, the software release and edition of the database, and release version of other software components.

Example 6-22 dbaascli database status

dbaascli database status --dbname db19

dbaascli database stop

To stop an Oracle Database, use the dbaascli database stop command.

Prerequisites

Run the command as the root user.

Syntax

dbaascli database stop
[-–dbname <value>]
[--mode <value>]
Where:
  • --dbname specifies the name of the database that you want to stop
  • --mode specifies the mode of the database. Valid values: abort, immediate, normal, transactional

The command performs a database shutdown in immediate mode. No new connections or new transactions are permitted. Active transactions are rolled back, and all connected users are disconnected.

Example 6-23 dbaascli database stop

dbaascli database stop --dbname db19

dbaascli database upgrade

To upgrade an Oracle Database, use the dbaascli database upgrade command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli database upgrade --dbname <value> 
{--targetHome <value> | --targetHomeName <value>}
{ [--executePrereqs | --postUpgrade | --rollback]}
{[--standBy | --allStandbyPrepared]}
{[--upgradeOptions <value>]  | [--standBy]}
[--removeGRP]
[--increaseCompatibleParameter]
[--resume [--sessionID <value>]]
[--waitForCompletion <value>]
Where:
  • --dbname (mandatory) specifies the name of the database.
  • --targetHome specifies the target Oracle home location
  • --targetHomeName specifies the name of the target Oracle Database home
  • --standBy use this option to upgrade standby databases in Data Guard configurations
  • --allStandbyPrepared required for Data Guard configured primary databases. Flags to acknowledge that all the required operations are performed on the standby databases prior to upgrading primary database
  • --removeGRP automatically removes the Guaranteed Restore Point (GRP) backup only if the database upgrade was successful
  • --increaseCompatibleParameter automatically increases the compatible parameter as part of the database upgrade. The parameter will get increased only if the database upgrade was successful
  • --executePrereqs runs only the preupgrade checks
  • --postUpgrade use this option if postupgrade fails and needs to rerun the postupgrade steps
  • --rollback reverts an Oracle Database to its original Oracle home
  • --upgradeOptions use this option to pass DBUA-specific arguments to perform the Oracle Database upgrade. Refer to the corresponding Oracle documentation for the supported arguments and options.

    --standby

  • --resume to resume the previous execution
  • --sessionID to resume a specific session id.
  • --waitForCompletion specify false to run the operation in background. Valid values : true|false.

Example 6-24 dbaascli database upgrade pre-upgrade requisite checks

dbaascli database upgrade --dbbname dbname --targetHome Target Oracle home location --executePrereqs

dbaascli dataguard prepareStandbyBlob

To generate a blob file containing various files that are required on the standby site in case of a dataguard environment, use the dbaascli dataguard prepareStandbyBlob command.

Run the command as the root or oracle user.

Syntax

dbaascli dataguard prepareStandbyBlob --dbname <value> --blobLocation <value>
Where:
  • --dbname specifies the Oracle Database name
  • --blobLocation specifies the custom directory location where the standby blob file will be generated in a Data Guard environment

dbaascli dataguard updateDGConfigAttributes

To update Data Guard automation attributes across all the cluster nodes, use the dbaascli dataguard updateDGConfigAttributes command.

Run the command as the root or oracleuser.

Syntax

dbaascli dataguard updateDGConfigAttributes --attributes <value>
Where:
  • --attributes contains the Data Guard automation attributes that are to be modified. Accepts comma-delimited values in the format <attribute=value>. Attributes must be predefined in the Data Guard configuration file.

dbaascli dbhome create

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

Prerequisite

Run the command as the root user.

Syntax

dbaascli dbhome create --version <value>
[--oracleHome <value>]
[--oracleHomeName <value>]
[--enableUnifiedAuditing <value>] 
[--imageTag <value>]
[--ImageLocation <value>
Where:
  • --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.

Example 6-25 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 Oracle Database home, use the dbaascli dbHome delete command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli dbHome delete 
{ --oracleHome <value> 
| --oracleHomeName <value> } [--resume [--sessionID <value>]] 
Where:
  • --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

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 }
Where:
  • --oracleHomeName specifies user-defined Oracle home name
  • --oracleHome specifies the location (path) of Oracle home

Example 6-26 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.

Prerequisite

Run the command as the root user.

Syntax

dbaascli dbHome getDetails
{ --oracleHomeName value | --oracleHome value }
Where:
  • --oracleHomeName specifies user-defined Oracle home name
  • --oracleHome specifies the location of Oracle home

Example 6-27 dbaascli dbHome getDetails - using Oracle home location

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

Example 6-28 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.

Prerequisite

Run the command as the root user.

Syntax

dbaascli dbHome patch --oracleHome | --oracleHomeName
--targetVersion
[--resume]
    [--sessionID]
[--continueWithDbDowntime]
[--skipUnreachableNodes]
[--nodes]
[--executePrereqs]
[--skipDatapatch]
[--imageLocation]
[--skipPDBs]
[--skipClosedPDBs]
[--rollback]
Where:
  • --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 (e.g. 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
  • --imageLocation specifies custom location for database image
  • --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.

Example 6-29 dbaascli dbhome patch

dbaascli dbhome patch --targetVersion 19.10.0.0.0 --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2

dbaascli dbimage purge

The dbimage purge command removes the specified software image from your Exadata Cloud Infrastructure environment.

Connect to the compute node as the opc user and execute this command as the root user.

# dbaascli dbimage purge --version software_version --bp software_bp [--cdb ( yes | no )]

In the preceding command:

  • software_version — specifies the Oracle Database software version. For example, 11204, 12102, 12201, 18000, 19000.

  • software_bp — identifies the bundle patch release. For example, APR2018, JAN2019, OCT2019, and so on.

  • --cdb — optionally specifies whether to remove the software image that supports the Oracle multitenant architecture. Default is yes. If you specify --cdb no, then the software image that contains binaries to support non-container databases (non-CDB) is removed.

If the command will remove a software image that is not currently available in the software image library, and therefore cannot be downloaded again, then the command pauses and prompts for confirmation.

You cannot remove the current default software image for any software version. To avoid this restriction, you must make another software image the current default.

dbaascli diag collect

To collect diagnostics, use the dbaascli diag collect command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli diag collect [--components <value>] [--startTime <value>] [--endTime <value>] [--nodes <value>] [--dbNames <value>]
        {
            [--objectStoreBucketUri <value>]
            | [--destLocation <value>]
        }
        [--waitForCompletion <value>]
Where:
  • --components specifies a list of components for log collection.

    Valid values:

    • db
    • gi
    • os
    • dbaastools
    • all
  • --startTime specifies the start time for log collection. Valid date and time format: YYYY-MM-DDTHH24:MM:SS
  • --endTime specifies the end time for log collection. Valid date and time format: YYYY-MM-DDTHH24:MM:SS
  • --nodes specifies a comma-delimited list of nodes to collect logs
  • --dbNames specifies the database name for which to collect logs. You can specify only one database name.
  • --objectStoreBucketURI specifies an Object Storage service pre-authenticated request (PAR) URL used to upload collected logs. Logs are collected from Guest VM. For more information, see Using Pre-Authenticated Requests.
  • --destLocation specifies the location on Guest VM to collect logs. Default: /var/opt/oracle/dbaas_acfs
  • --waitForCompletion Values: true|false. Default true. Specify false to run in the background.

dbaascli diag healthCheck

To run diagnostic health checks, use the dbaascli diag healthCheck command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli diag healthCheck
[--destLocation]
[--nodes]
[--objectStoreBucketURI]
Where:
  • --destLocation specifies the location on Guest VM to collect logs. Default: /var/opt/oracle/dbaas_acfs
  • --nodes specifies a comma-delimited list of nodes to collect logs
  • --objectStoreBucketURI specifies an Object Storage service pre-authenticated request (PAR) URL used to upload collected logs. Logs are collected from Guest VM. For more information, see Using Pre-Authenticated Requests.

dbaascli gridHome create

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

Prerequisite

Run the command as the root user.

Syntax

dbaascli gridHome create --version value [--resume [--sessionID value]] [--waitForCompletion value]
Where:
  • --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|false

dbaascli grid configureTCPS

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

Prerequisite

Run the command as the root user.

Syntax

Note

By default, TCPS is enabled for databases on Oracle Exadata Database Service on Dedicated Infrastructure systems.
Note

TCPS is not enabled for databases on Exadata Database Service on Cloud@Customer systems. To enable TCPS for a given database, update the database specific sqlnet.ora file with WALLET_LOCATION = (SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/var/opt/oracle/dbaas_acfs/grid/tcps_wallets))) on all database nodes and then bounce the database. This will enable TCPS usage for the database. However, enabling TCPS will cause ZDLRA connection to fail. On Exadata Database Service on Cloud@Customer systems, you can enable either ZDLRA or TCPS configuration. Enabling both ZDLRA and TCPS simultaneously will not work.
dbaascli grid configureTCPS
[--pkcs12WalletPath]
[--caCertChain]
[--precheckOnly]
[--serverCert]
[--privateKey]
[--certType]
[--privateKeyPasswordProtected]
Where:
  • --pkcs12WalletPath specifies the path of the certificate, which is in 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.

Example 6-30 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 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> 
[--containerURL <value>] 
[--executePrereqs] 
[--nodeList <value>] 
[--rollback] 
[--resume [--sessionID <value>]] 
[--continueWithDbDowntime]
        {
            [--createImage [--createImageDir <value>]]
            | [--imageFile <value>]
        }
[--waitForCompletion <value>]

Where:

  • --targetVersion specifies the target version of Oracle Home specified as five numeric segments separated by periods (e.g. 19.12.0.0.0)
  • --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
  • --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.
  • --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
  • --waitForCompletion specifies false to run the operation in background. Valid values: true|false

Example 6-31 dbaascli grid patch

dbaascli grid patch --targetVersion 19.12.0.0.0

dbaascli grid removeTCPSCert

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

Prerequisite

Run the command as the root user.

Syntax

dbaascli grid removeTCPSCert --subject <value>
 {
   --userCert | --trustedCert | --requestedCert
 }
 [--serialNumber <value>] [--executePrereqs] [--resume [--sessionID <value>]] [--bounceListeners]
Where:
  • --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

dbaascli grid rotateTCPSCert

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

Prerequisite

Run the command as the root user.

Syntax

dbaascli grid rotateTCPSCert
[--pkcs12WalletPath]
[--caCertChain]
[--precheckOnly]
[--serverCert]
[--privateKey]
[--certType]
[--privateKeyPasswordProtected]
Where:
  • --pkcs12WalletPath specifies the path of the certificate, which is in 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.

Example 6-32 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 Infrastrucure from one major version to another, use the dbaascli grid upgrade command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli grid upgrade --version
[--resume]
[--executePrereqs]
[--containerURL]
[--softwareOnly]
[--targetHome]
[--revert]
Where:
  • --version specifies the target version
  • --resume resumes the previous run
  • --executePrereqs runs prereqs for Grid Infrastrucure upgrade
  • --containerUrl specifies the custom URL for fetching Grid Infrastrucure image
  • --softwareOnly installs only the Grid Infrastructure software
  • --targetHome specifies the path of existing target Grid home
  • --revert reverts failed run

Example 6-33 dbaascli grid upgrade

daascli 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 job getStatus

To view the status of a specified job, use the dbaascli job getStatus command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli job getStatus --jobID
Where:
  • --jodID specifies the job ID

Example 6-34 dbaascli job getStatus

dbaascli job getStatus --jobID 13c82031-f202-41b7-9aef-f4a71df0f551
DBAAS CLI version MAIN
Executing command job getStatus --jobID 13c82031-f202-41b7-9aef-f4a71df0f551
{
  "jobId" : "13c82031-f202-41b7-9aef-f4a71df0f551",
  "status" : "Success",
  "message" : "database create job: Success",
  "createTimestamp" : 1628095442431,
  "updatedTime" : 1628095633660,
  "description" : "Service job report for operation database create",
  "appMessages" : {
    "schema" : [ ],
    "errorAction" : "SUCCEED_AND_SHOW"
  },
  "resourceList" : [ ],
  "pct_complete" : "100"
}

dbaascli patch db apply

Note

dbaascli patch db prereq and dbaascli patch db apply commands have been deprecated in dbaascli release 21.2.1.2.0, and replaced with dbaascli grid patch, dbaascli dbhome patch, and dbaascli database move commands.
For more information, see:
  • dbaascli grid patch
  • dbaascli dbhome patch
  • dbaascli database move
  • Patching Oracle Grid Infrastructure and Oracle Databases Using dbaascli

dbaascli patch db prereq

Note

dbaascli patch db prereq and dbaascli patch db apply commands have been deprecated in dbaascli release 21.2.1.2.0, and replaced with dbaascli grid patch, dbaascli dbhome patch, and dbaascli database move commands.
For more information, see:
  • dbaascli grid patch
  • dbaascli dbhome patch
  • dbaascli database move
  • Patching Oracle Grid Infrastructure and Oracle Databases Using dbaascli

dbaascli pdb backup

To backup a pluggable database (PDB), query PDB backups, and delete a PDB backup, use the dbaascli pdb backup command.

Prerequisite

  • Run the command as the root user.

Syntax

dbaascli pdb backup --pdbName <value> --dbname <value>
        {
            --start
                {
                    [--level1]
                    | [--archival --tag <value>]
                }
            | --delete --backupTag <value>
            | --status --uuid <value>
            | --getBackupReport --json <value> --tag <value>
            | --list [--json <value>]
        }
Where:
--pdbName: PDB name.
--dbname: Oracle Database name.
--start | --delete | --status | --getBackupReport | --list
--start: Begins PDB backup.
      [--level1 | --archival]
      [--level1: Creates a Level-1 (incremental) backup.]
      [--archival: Creates an archival full backup.]
          --tag: Specify backup tag.
--delete: Deletes archival backup.
          --backupTag: Specify backup tag to delete.
--status
          --uuid <value>
--getBackupReport: Returns backup report.
         --json: Specify the file name for JSON output.
         --tag: Specify backup tag.
--list: Returns PDB backup information.
         [--json: Specify the file name for JSON output.]

Example 6-35 Examples

  • To take level1 backup for a PDB pdb1 in a CDB myTestDb:
    dbaascli pdb backup --dbname myTestDb --pdbName pdb1 --start --level1
  • To query the status of PDB backup request submitted with uuid eef16b26361411ecb13800163e8e4fac:
    dbaascli pdb backup --dbname myTestDb --pdbName pdb1 --status --uuid eef16b26361411ecb13800163e8e4fac

dbaascli pdb bounce

To bounce a pluggable database (PDB), use the dbaascli pdb bounce command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb bounce --dbname --pdbName | --pdbUID
[–openMode]
Where:
  • --dbname specifies the name of the container database that hosts the PDB
  • --pdbName specifies the name of the PDB
  • --pdbUID specifies the identifier of the PDB
  • --openMode specifies the target OPEN MODE of PDB

Example 6-36 dbaascli pdb bounce

dbaascli pdb bounce --dbname cdb_name --pdbName pdb name associated with the CDB
dbaascli pdb bounce --dbname cdb_name --pdbUID con_uid of that pdb
Optional:
  • --openMode READ_WRITE
  • --openMode READ_ONLY

dbaascli pdb close

To close a pluggable database (PDB), use the dbaascli pdb close command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb close --dbname --pdbName | --pdbUID
Where:
  • --dbname specifies the name of the container database that hosts the PDB.
  • --pdbname specifies the name of the PDB that you want to close.
  • --pdbUID specifies the identifier of the PDB

Upon successful completion of running this command, the PDB is closed on all of the container database instances.

Example 6-37 dbaascli pdb close

dbaascli pdb close --dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb close --dbname cdb name --pdbUID con_uid of that pdb

dbaascli pdb getConnectString

To display Oracle Net connect string information for a pluggable database (PDB) run the dbaascli pdb getConnectString command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb getConnectString --dbname --pdbName | --pdbUID
Where:
  • --dbname specifies the name of the container database that hosts the PDB
  • --pdbname specifies the name of the PDB for which you want to display connect string information
  • --pdbUID specifies the identifier of the PDB

Example 6-38 dbaascli pdb getConnectString

dbaascli pdb getConnectString --dbname dbname --pdbName pdbName

dbaascli pdb create

To create a new pluggable database (PDB), use the dbaascli pdb create command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb create --pdbName <value> --dbName <value> 
[--maxCPU <value>] 
[--maxSize <value>] 
[--pdbAdminUserName <value>] 
[--lockPDBAdminAccount <value>] 
[--resume [--sessionID <value>]] 
[--executePrereqs <value>] 
[--waitForCompletion <value>] 
[--blobLocation |--standbyBlobFromPrimary <value>]
Where:
  • --pdbName specifies the name of the new PDB that you want to create
  • --dbName specifies the name of the container database that hosts the new PDB
  • --maxCPU optionally specifies the maximum number of CPUs that are available to the PDB. Setting this option is effectively the same as setting the CPU_COUNT parameter in the PDB
  • --maxSize optionally specifies the maximum total size of data files and temporary files for tablespaces belonging to the PDB. Setting this option is effectively the same as setting the MAXSIZE PDB storage clause in the CREATE PLUGGABLE DATABASE SQL command. You can impose a limit by specifying an integer followed by a size unit (K, M, G, or T), or you can specify UNLIMITED to explicitly enforce no limit
  • --pdbAdminUserName specifies the new PDB admin user name
  • --lockPDBAdminAccount specifies true or false to lock the PDB admin user account. Default value is true.
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes or no
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false
  • --blobLocation custom directory location where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary specifies the location of the standby blob file, which is prepared from the primary database. This is required only for standby database PDB operations.
    Note

    the parametersblobLocation and standbyBlobFromPrimary are mutually exclusive.

During the PDB creation process, you are prompted to specify the administration password for the new PDB.

Example 6-39 dbaascli pdb create

To create a PDB from seed in a standard database in a non-Data Guard environment:
dbaascli pdb create --dbName db721 --pdbName new_pdb1 --maxsize 5G --maxcpu 2
To create PDB in Data Guard environment:
dbaascli pdb create --dbName db721 --pdbName new_pdb1
dbaascli pdb create --dbName db721 --pdbName new_pdb1 --standbyBlobFromPrimary /tmp/send_db721.tar

dbaascli pdb delete

To delete a pluggable database (PDB) run the dbaascli pdb delete command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb delete --dbName value 
{ --pdbName value | --pdbUID value }
[--executePrereqs value]
[--waitForCompletion value]
[--resume [--sessionID value]]
[--allStandbyPrepared]
[--cleanupRelocatedPDB]
Where:
  • --dbName specifies the name of the container database that hosts the PDB
  • --pdbName specifies the name of the PDB that you want to delete
  • --pdbUID specifies the UID of the PDB that you want to delete
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes or no
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false
  • --resume specifies to resume the previous execution
    • --sessionID specifies to resume a specific session ID
  • --allStandbyPrepared specifies to confirm that the operation has been successfully run on all the standby databases
  • --cleanupRelocatedPDB - option to cleanup source database after a PDB has been relocated.
Example: dbaascli pdb delete

To delete a PDB from a standard database in a non-Data Guard environment or from Standby database in Data Guard environment.

dbaascli pdb delete --dbName db721 --pdbName pdb1

To create PDB from Primary database in Data Guard environment:

dbaascli pdb create --dbName db721 --pdbName pdb1 --allStandbyPrepared

dbaascli pdb getDetails

To view details of a pluggable database (PDB), use the dbaascli pdb getDetails command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb getDetails --dbname --pdbName | --pdbUID
Where:
  • --dbname specifies the name of the container database that hosts the PDB
  • --pdbname specifies the name of the PDB that you want to delete
  • --pdbUID specifies the identifier of the PDB

Example 6-40 dbaascli pdb getDetails

dbaascli pdb getDetails--dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb getDetails--dbname cdb name --pdbUID con_uid of that pdb

dbaascli pdb list

To view the list of pluggable databases (PDB) in a container database, use the dbaascli pdb list command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb list --dbname
Where:
  • --dbname specifies the name of the container database that hosts the PDB

Example 6-41 dbaascli pdb list

dbaascli pdb list --dbname cdb name

dbaascli pdb localClone

To create a new pluggable database (PDB) as a clone of an existing PDB in the same container database (CDB), use the dbaascli pdb localClone command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli pdb localClone --pdbName <value> --dbName <value>
[--targetPDBName <value>]
[--powerLimit <value>]
[--maxCPU <value]
[--maxSize <value>]
[--resume [--sessionID <value>]]
[--executePrereqs]
[--waitForCompletion <value>]
{[--blobLocation <value>]|[--standbyBlobFromPrimary <value>]}
[--excludeUserTablespaces <value>] 
[--excludePDBData <value>] 
[--pdbAdminUserName <value>] 
[--lockPDBAdminAccount <value>] 
[--sourcePDBServiceConvertList <value>]
Where:
  • --pdbName specifies the name of the new PDB that you want to clone
  • --dbName specifies the name of the database
  • --targetPDBName specifies the name for the target PDB (new cloned PDB)
  • --powerLimit specifies the degree of parallelism to be used for the clone operation. Valid value is between 1 and 128
  • --maxCPU specifies the maximum number of CPUs to be allocated for the PDB
  • --maxSize specifies the maximum storage size in GB for the new PDB
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes or no
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false
  • --blobLocation custom directory location where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary specifies the location of the standby blob file which is prepared from the primary database. This is required only for standby database PDB operations.
    Note

    The parameters --blobLocation and --standbyBlobFromPrimary are mutually exclusive.
  • --excludeUserTablespaces option to skip user table spaces, example t1,t2,t3.
  • --excludePDBData specify true/yes to skip user data from source pdb.
  • --pdbAdminUserName specify new PDB admin user name.
  • --lockPDBAdminAccount specify true or false to lock the PDB admin user account. Default value is true.
  • --sourcePDBServiceConvertList specify comma separated list of source to target service names which need to be converted. Syntax is source_srv1:new_srv1,source_srv2:new_srv2.

The newly cloned PDB inherits administration passwords from the source PDB.

Example 6-42 dbaascli pdb localClone

dbaascli pdb localClone --dbName db35 --pdbName PDB35 --targetPDBName local_clone1 --maxCPU 2 --maxSize 15

dbaascli pdb open

To open a pluggable database (PDB), use the dbaascli pdb open command.

Run the command as the root or oracle user.

Syntax

dbaascli pdb open
 {
   --pdbName <value> | --pdbUID <value>
 }
--dbname <value> [--openMode <value>] [--startServices <value>] [--waitForCompletion <value>] [--setPDBRefreshModeNone [--skipPDBRefresh] [--pdbAdminUserName <value>]]
Where:
  • --pdbName specifies the name of the PDB that you want to open
  • --pdbUID specifies the identifier of the PDB
  • --dbname specifies the name of the container database that hosts the PDB.
  • --openMode specifies the target OPEN MODE of PDB
  • --startServices: specifies to start all or list all services corresponding to a PDB. Accepted values are all or a comma-delimited list of PDB services.
  • --waitForCompletion: specify false to run the operation in the background. Valid values: true|false
  • --setPDBRefreshModeNone: specifies to convert a refreshable PDB to non-refreshable PDB
    • --skipPDBRefresh: specifies to skip refreshable PDB refresh
    • --pdbAdminUserName: specifies new PDB admin user name

Upon successful completion, the PDB is opened on all of the container database instances.

Example 6-43 dbaascli pdb open

dbaascli pdb open --dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb open --dbname cdb name --pdbUID con_uid of that pdb

Optional: --openMode READ_WRITE/READ_ONLY

dbaascli pdb recover

To recover a pluggable database (PDB), use the dbaascli pdb recover command.

Prerequisite

  • Run the command as the root user.
  • Database must be configured with backup storage destination details where backups are stored.

Syntax

dbaascli pdb recover --pdbName <value> --dbname <value>
        {
            --start
                {
                    --untilTime <value>
                    | --untilSCN <value>
                    | --latest
                    | --tag <value>
                }
            | --status --uuid <value>
        }
Where:
--pdbName: PDB name.
--dbname: Oracle Database name.
--start | --status
--start
       --untilTime | --untilSCN | --latest | --tag
       --untilTime: Recovers PDB until time. Input format: DD-MON-YYYY HH24:MI:SS.
       --untilSCN: Recovers PDB until SCN.
       --latest: Recovers PDB to last known state.
       --tag: Recovers PDB to archival tag.
--status
       --uuid <value>

Example 6-44 Examples

  • To recover a PDB pdb1 in a CDB myTestDb to latest:
    dbaascli pdb recover --dbname myTestDb --pdbName pdb1 --start --latest
  • To query the status of PDB recovery request submitted with uuid 81a17352362011ecbc3000163e8e4fac:
    dbaascli pdb recover --dbname myTestDb --pdbName pdb1 --status --uuid 81a17352362011ecbc3000163e8e4fac

dbaascli pdb refresh

To refresh a specified pluggable database (PDB), use the dbaascli pdb refresh command.

Run the command as the root or oracle user.

Syntax

dbaascli pdb refresh --dbname <value>
   {
      --pdbName <value> | --pdbUID <value>
    }
    [--waitForCompletion <value>]

Where:

  • --dbname: specifies the name of the Oracle Database
  • --pdbName: specifies the name of the pluggable database
  • --pdbUID: specifies the identifier of the pluggable database
  • --waitForCompletion: specify false to run the operation in the background. Valid values: true|false

dbaascli pdb relocate

To relocate the specified PDB from the remote database into local database, use the dbaascli pdb relocate command.

Prerequisite

Run the command as the oracle user. When prompted, you must supply the SYS user password for the source database.

Syntax

dbaascli pdb relocate --pdbName <value> --dbName <value> --sourceDBConnectionString <value> 
[--targetPDBName <value>]
[--powerLimit <value>]
[--maxCpu <value>]
[--maxSize <value>]
[--resume [--sessionID <value>]]
[--executePrereqs <value>]
[--sourcePDBServices <value>]
[--sourcePDBReadOnlyServices <value>]
[--waitForCompletion <value>]
{
    [--blobLocation <value>] | [--standbyBlobFromPrimary <value>]
}
[--upgradePDB <value>]
[--updateDBBlockCacheSize]
{
    [skipOpenPDB] | [--completePDBRelocate]
}
Where:
  • --pdbName specifies the source PDB name to relocate
  • --dbName specifies the target database name
  • --sourceDBConnectionString specifies the source database connection string in the format <scan_name>:<scan_port>/<database_service_name>
  • --targetPDBName specifies a name for the target PDB (new relocated PDB)
  • --powerLimit specifies the degree of parallelism to be used for the relocate operation
  • --maxCpu specifies the maximum number of CPUs to be allocated for the PDB
  • --maxSize specifies the maximum storage size in GB for the new PDB
  • --resume specifies to resume the previous execution
    • --sessionID specifies to resume a specific session ID
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes|no
  • --sourcePDBServices specifies a list of comma-delimited source PDB services
  • --sourcePDBReadOnlyServices specifies a comma-delimited list of source PDB read-only services
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true|false
  • --blobLocation custom directory location where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary specify the location of the standby blob file which is prepared from the primary database. This is required only for standby operations.
    Note

    The parameters --blobLocation and mutually exclusive.
  • --upgradePDB specify true to upgrade the PDB as part of this operation. Valid values : true | false.
  • --updateDBBlockCachesize option to enable application to set db block cache size initialization parameters in order to support data copy with different block size.
  • --skipOpenPDB - to indicate that the PDB should not be opened at the end of the current operation.
  • --completePDBRelocate - complete the PDB relocation if done as a two-step operation.

Example 6-45 dbaascli pdb relocate

dbaascli pdb relocate --sourceDBConnectionString test-scan.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com:1521/source_cdb_service_name --pdbName source_pdb --dbName target_db

dbaascli pdb remoteClone

To create a new pluggable database (PDB) as a clone of an existing PDB in another container database (CDB), use the dbaascli pdb remoteClone command.

Run the command as the root or oracle user.

Syntax

dbaascli pdb remoteClone --pdbName <value> --dbName <value> --sourceDBConnectionString <value> [--targetPDBName <value>] [--powerLimit <value>] [--maxCPU <value>] [--maxSize <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>] [--sourcePDBExportedTDEKeyFile <value>]
        {
            [--blobLocation <value>]
            | [--standbyBlobFromPrimary <value>]
        }
[--excludeUserTablespaces <value>] 
[--excludePDBData <value>] 
[--pdbAdminUserName <value>] 
[--lockPDBAdminAccount <value>] 
[--sourcePDBServiceConvertList <value>] 
[--refreshablePDB --refreshMode <value> [--refreshIntervalInMinutes <value>] --dblinkUsername <value> [--honorCaseSensitiveUserName]] 
[--updateDBBlockCacheSize]
Where:
  • --pdbName specifies the name of the source PDB that you want to clone
  • --dbname specifies the name (DB_NAME) of the CDB that hosts the newly cloned PDB
  • --sourceDBConnectionString specifies the source database connection string in the format scan_name:scan_port/database_service_name
  • --targetPDBName specifies the name for the target PDB (new cloned PDB)
  • --powerLimit specifies the degree of parallelism to be used for the clone operation. Valid value is between 1 and 128
  • --maxCPU specifies the maximum number of CPUs to be allocated for the PDB
  • --maxSize specifies the maximum storage size in GB for the new PDB
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --executePrereqs specifies yes to run only the prereqs for this operation. Valid values: yes or no
  • --waitForCompletion specifies false to run the operation in the background. Valid values: true or false
  • --sourcePDBExportedTDEKeyFile specifies the source PDB exported key file. This variable is applicable to only 12.1 database.
  • --blobLocation specifies the custom path where the standby blob file will be generated in a Data Guard environment
  • --standbyBlobFromPrimary specify the location of the standby blob file, which is prepared from the primary database. This is required only for standby database PDB operations
    Note

    The parameters --blobLocation and --standbyBlobFromPrimary are mutually exclusive.
  • --excludeUserTablespaces option to skip user table spaces, example t1,t2,t3.
  • --excludePDBData specify true/yes to skip user data from source PDB.
  • --pdbAdminUserName specifies new PDB admin user name
  • --lockPDBAdminAccount specify true or false to lock the PDB admin user account. Default value is true.
  • --sourcePDBServiceConvertList specify a comma-delimited list of source to target service names, which need to be converted. Syntax is source_srv1:new_srv1, source_srv2:new_srv2.
  • --refreshablePDB specifies to create refreshable PDB
    • --refreshMode specifies refresh mode for refreshable PDB. Valid values: AUTO|MANUAL
      • --refreshIntervalInMinutes specifies refresh interval for refreshablePDB in minutes
    • --dblinkUsername specifies common user of a remote database used for database link to connect to the remote database
      • --honorCaseSensitiveUserName indicates specified username is case sensitive
  • --updateDBBlockCacheSize: specifies to enable application to set db block cache size initialization parameters to support data copy with a different block size

When promoted, you must supply the SYS user password for the source PDB. The newly cloned PDB inherits administration passwords from the source PDB. The cloned PDB is named using the following format: dbname_sourcepdbname. This command is supported only for databases that are not in a Data Guard configuration and use Oracle Database version 12.2.0.1, or later.

Example 6-46 dbaascli pdb remoteClone

dbaascli pdb remoteClone --sourceDBConnectionString test-can.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com:1521 --pdbName source_pdb1 --dbName db9944 --targetPDBName new_pdb1 --maxsize 5 --maxcpu 2
dbaascli pdb remoteClone --sourceDBConnectionString orcla.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com --pdbName source_pdb1 --dbName db9944 --targetPDBName new_pdb1 --maxsize 5 --maxcpu 2

dbaascli system getDBHomes

To view information about all the Oracle homes, use the dbaascli system getDBHomes command.

Prerequisite

Run the command as the root or oracle user.

Syntax

dbaascli system getDBHomes

Example 6-47 dbaascli system getDBHomes

dbaascli system getDBHomes

dbaascli system getGridHomes

To list the details of all Grid homes, use the dbaascli system getGridHomes command.

Prerequisite

Run the command as the root or oracle user.

Syntax

dbaascli system getGridHomes

dbaascli tde changePassword

To change TDE keystore password as well as DB wallet password for the alias tde_ks_passwd, use the dbaascli tde changePassword command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde changePassword [--dbname <value>]
  {            [--prepareStandbyBlob <value> [--blobLocation <value>]]
               | [--standbyBlobFromPrimary <value>]
  }
  [--resume [--sessionID <value>]]
Where:
  • --dbname specifies the name of the database
  • --prepareStandbyBlob - specify true to generate a blob file containing the artifacts needed to perform the operation in a DG environment.
  • --blobLocation - custom path where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary - specify the location of the standby blob file which is prepared from the primary database. This is required only for standby operations.
  • --resume - to resume the previous execution
  • --sessionID - to resume a specific session id.
To change the TDE password in a non-Data Guard environment
dbaascli tde changepassword --dbname
      <dbname>
To change the TDE password in a Data Guard environment
  1. Change the TDE password in primary database.
    dbaascli tde changepassword --dbname
          <dbname> --prepareStandbyBlob true --blobLocation
          <Location where blob file has to be generated>
  2. Copy the created standby blob to standby database environment.
  3. Change the TDE password in standby database
    dbaascli tde changepassword --dbname
         <dbname> --standbyBlobFromPrimary <Location of blob generated from
        primary>

dbaascli tde addSecondaryHsmKey

To add a secondary HSM (KMS) key to the existing HSM (KMS) configuration, use the dbaascli tde addSecondaryHsmKey command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde addSecondaryHsmKey --dbname <value> --secondaryKmsKeyOCID <value>
[--executePrereqs]
Where:
  • --secondaryKmsKeyOCID specifies the secondary KMS key to add to the existing HSM (KMS) configuration
  • --dbname specifies the name of the database
  • --executePrereqs sexecute the prerequisites checks and report the results.

Example 6-48 dbaascli tde addSecondaryHsmKey

dbaascli tde addSecondaryHsmKey --dbname dbname --secondaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza
dbaascli tde addSecondaryHsmKey --dbname dbname --secondaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza --precheckOnly yes

dbaascli tde enableWalletRoot

To enable wallet_root spfile parameter for the existing database, use the dbaascli tde enableWalletRoot command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde enableWalletRoot
[--dbRestart]
[--dbname]
[--precheckOnly]
Where:
  • --dbrestart specifies the database restart option. Valid values are: rolling or full. Default value: rolling

    If you do not pass the dbrestart argument, then the database restarts in a rolling manner.

  • --dbname specifies the name of the Oracle Database.
  • --precheckOnly runs only the precheck for this operation. Valid values are: yes or no

Example 6-49 dbaascli tde enableWalletRoot

dbaascli tde enableWalletRoot --dbname db name --dbrestart rolling|full
dbaascli tde enableWalletRoot --dbname orcl
dbaascli tde enableWalletRoot --dbname orcl--dbrestart full

dbaascli tde encryptTablespacesInPDB

To encrypt all the tablespaces in the specified PDB, use the dbaascli tde encryptTablespacesInPDB command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde encryptTablespacesInPDB --pdbName
[--dbname]
[--precheckOnly]
[--useSysdbaCredential]
Where:
  • --pdbName specifies the name of the PDB to encrypt all the tablespaces.
  • --dbname specifies the name of the Oracle Database.
  • --precheckOnly runs only the precheck for this operation. Valid values: yes or no
  • --useSysdbaCredential uses SYSDBA credentials for this operation if passed value is true. Valid values: true or false

Example 6-50 dbaascli tde encryptTablespacesInPDB

dbaascli tde encryptTablespacesInPDB --dbname dbname --pdbName pdb
dbaascli tde encryptTablespacesInPDB --dbname dbname --pdbName pdb --precheckOnly yes
dbaascli tde encryptTablespacesInPDB --dbname dbname --pdbName pdb --useSysdbaCredential true

dbaascli tde fileToHsm

To convert FILE based TDE to HSM (KMS/OKV) based TDE, use the dbaascli tde fileToHsm command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde fileToHsm --kmsKeyOCID <value> --dbname <value> 
[--skipPatchCheck <value>] 
[--executePrereqs ] 
[--primarySuc <value>]
{
    [--resume [--sessionID <value>]] | [--revert [--sessionID <value>]]
}
[--waitForCompletion <value>]
Where:
  • --kmsKeyOCID specifies the KMS key OCID to use for TDE. This is applicable only if KMS is selected for TDE
  • --dbname specifies the name of the database
  • --skipPatchCheck skips validation check for required patches if the value passed for this argument is true. Valid values: true or false
  • --executePrereqs sexecute the prerequisites checks and report the results.
  • --primarySuc specify this property in the standby database of the Data Guard environment once the command is successfully run on the primary database
  • --resume specifies to resume the previous run
    • --sessionID specifies to resume a specific session ID
  • --revert specifies to rollback the previous run
    • --sessionID specifies to rollback a specific session ID
  • --waitForCompletion specify false to run the operation in background. Valid values : true|false.

Example 6-51 dbaascli tde fileToHsm --kmsKeyOCID

dbaascli tde fileToHSM --dbname dbname --kmsKeyOCID ocid1.key.oc1.eu-frankfurt-.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza
dbaascli tde fileToHSM --dbname dbname --kmsKeyOCID ocid1.key.oc1.eu-frankfurt-.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza --executePrereqs 
dbaascli tde fileToHSM --dbname dbname --kmsKeyOCID ocid1.key.oc1.eu-frankfurt-.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza --resume

dbaascli tde getHsmKeys

To get TDE active key details, use the dbaascli tde getHsmKeys command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde getHsmKeys
[--dbname]
[--infoFile]
Where:
  • --dbname specifies the name of the database
  • --infoFile specifies the file path where the list of OCIDs will be saved. The output is in JSON format

Example 6-52 dbaascli tde getHsmKeys

dbaascli tde getHsmkeys --dbname dbname
dbaascli tde getHsmkeys --dbname dbname --infoFile infoFilePath

dbaascli tde getMkidForKeyVersionOCID

To get Master Key ID associated with the KMS key version OCID, use the dbaascli tde getMkidForKeyVersionOCID command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde getMkidForKeyVersionOCID --kmsKeyVersionOCID <value>
[--dbname <value>]
[--waitForCompletion <value>]
Where:
  • --kmsKeyVersionOCID specifies the KMS key version OCID to set
  • --dbname specifies the name of the database
  • --waitForCompletion specify false to run the operation in background. Valid values : true|false.

Example 6-53 dbaascli tde getMkidForKeyVersionOCID

dbaascli tde getMkidForKeyVersionOCID --dbname dbname --kmsKeyVersionOCID ocid1.keyversion.oc1.eu-frankfurt-1.bjqnwclvaafak.bc4hmd3olgaaa.abtheljsyxtgn4vzi2bbpcej6a7abcwvylkd2lx56lu2s6iwnxwgigu23nha

dbaascli tde getPrimaryHsmKey

To get primary HSM (KMS) key from the existing HSM (KMS) configuration, use the dbaascli tde getPrimaryHsmKey command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde getPrimaryHsmKey
[--dbname]
Where:
  • --dbname specifies the name of the database

Example 6-54 dbaascli tde getPrimaryHsmKey

dbaascli tde getPrimaryHsmKey --dbname dbname

dbaascli tde hsmToFile

To convert HSM (KMS/OKV) based TDE to FILE based TDE, use the dbaascli tde hsmToFile command.

Run the command as the root user.

Syntax

dbaascli tde hsmToFile 
[--dbname <value>] 
{
    [--prepareStandbyBlob <value> [--blobLocation <value>]
   | [--standbyBlobFromPrimary <value>]
}
] 
[--skipPatchCheck <value>] 
[--executePrereqs ] 
[--primarySuc <value>] 
{
     [--resume [--sessionID <value>]] |
     [--revert [--sessionID <value>]]
} 
[--waitForCompletion <value>]
Where:
  • --dbname specifies the name of the database
  • --prepareStandbyBlob specify true to generate a blob file containing the artifacts needed to perform the operation in a DG environment.
  • --blobLocation custom directory location where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary specify the location of the standby blob file which is prepared from the primary database. This is required only for standby operations. ]
  • --skipPatchCheck skips validation check for required patches if the value passed for this argument is true. Valid values: true or false
  • --executePrereqs execute the prerequisites checks and report the results.
  • --primarySuc specify this property in the standby database of the Data Guard environment once the command is successfully run on the primary database
  • --resume resumes the previous run
    • --sessionID specifies to resume a specific session ID
  • --revert specifies to roll back the previous run
    • --sessionID specifies to rollback a specific session ID
  • --waitForCompletion specifies false to run the operation in background. Valid values: true|false

Example 6-55 dbaascli tde hsmToFile

dbaascli tde hsmToFile --dbname dbname
dbaascli tde hsmToFile --dbname dbname --executePrereqs
dbaascli tde hsmToFile --dbname dbname --resume

dbaascli tde listKeys

To list TDE master keys, use the dbaascli tde listKeys command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde listKeys
[--dbname <value>]
[--infoFilePath <value>]
Where:
  • --dbname specifies the name of the database
  • --infoFilePath specify the absolute path of the file where the results will be saved.

Example 6-56 dbaascli tde listKeys

dbaascli tde listKeys --dbname dbname
dbaascli tde listKeys --dbname dbname --infoFilePath infoFilePath

dbaascli tde removeSecondaryHsmKey

To remove secondary HSM (KMS) key from the existing HSM (KMS) configuration, use the dbaascli tde removeSecondaryHsmKey command.

Prerequisite

Run the command as the root user.

Syntax

dbaascli tde removeSecondaryHsmKey --dbname <value>
[--confirmDeletion]
[--secondaryKmsKeyOCID]
[--executePrereqs]
Where:
  • --dbname specifies the name of the database
  • --confirmDeletion if not specified the user will be prompted while deleting all existing HSM(KMS) keys.
  • --secondaryKmsKeyOCID secondary KMS key to be removed from existing HSM(KMS) configuration. If not specified all secondary KMS keys will be removed.
  • --executePrereqs execute the prerequisites checks and report the results.

Example 6-57 dbaascli tde removeSecondaryHsmKey

dbaascli tde removeSecondaryHsmKey --dbname dbname
dbaascli tde removeSecondaryHsmKey --dbname dbname --secondaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza
dbaascli tde removeSecondaryHsmKey --dbname dbname --secondaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza --executePrereqs 

dbaascli tde rotateMasterKey

Rotate the master key for database encryption.

Prerequisites:

Run the command as the root user.

Syntax

(Optional) <Enter syntax information here.>

dbaascli tde rotateMasterKey --dbname <value> 
[--rotateMasterKeyOnAllPDBs] 
[--pdbName <value>] 
[--executePrereqs] 
[--resume [--sessionID <value>]]
{
     [--prepareStandbyBlob <value> [--blobLocation <value>]]
     | [--standbyBlobFromPrimary <value>]
 }
Where:
  • --dbname - Oracle database name.
  • --rotateMasterKeyOnAllPDBs - specify true to rotate master key of all PDBs in CDB. Valid values: true|false
  • --pdbName - specify PDB name.
  • --executePrereqs - execute the prerequisites checks and report the results.
  • --resume - to resume the previous execution
  • --sessionID - to resume a specific session id.
  • --prepareStandbyBlob | --standbyBlobFromPrimary]
  • --prepareStandbyBlob - specify true to generate a blob file containing the artifacts needed to perform the operation in a DG environment.
  • --blobLocation - custom directory location where the standby blob file will be generated in a DG environment.
  • --standbyBlobFromPrimary - specify the location of the standby blob file which is prepared from the primary database. This is required only for standby operations

dbaascli tde setKeyVersion

To set the version of the primary key to be used in DB/CDB or PDB, use the dbaascli tde setKeyVersion command.

Run the command as the root user.

Syntax

dbaascli tde setKeyVersion --kmsKeyVersionOCID <value> --dbname <value>
[--pdbName <value>]
[--masterKeyID <value>]
[--standbySuc]
[--executePrereqs]
[--waitForCompletion <value>]
Where:
  • --kmsKeyVersionOCID specifies the KMS key version OCID to set.
  • --dbname specifies the name of the database.
  • --pdbName name of the PDB to use the key version OCID.
  • --masterKeyID specifies the master key ID of the given key version OCID. This is applicable to the Data Guard environment.
  • --standbySuc specify this property in the primary database of the Data Guard environment once the command is successfully run on the standby database
  • --executePrereqs execute the prerequisites checks and report the results.
  • --waitForCompletion specify false to run the operation in background. Valid values: true|false

Example 6-58 dbaascli tde setKeyVersion

dbaascli tde setKeyVersion --dbname dbname --kmsKeyVersionOCID ocid1.keyversion.oc1.eu-frankfurt-1.bjqnwclvaafak.bc4hmd3olgaaa.abtheljsyxtgn4vzi2bbpcej6a7abcwvylkd2lx56lu2s6iwnxwgigu23nha
dbaascli tde setKeyVersion --dbname dbname --kmsKeyVersionOCID ocid1.keyversion.oc1.eu-frankfurt-1.bjqnwclvaafak.bc4hmd3olgaaa.abtheljsyxtgn4vzi2bbpcej6a7abcwvylkd2lx56lu2s6iwnxwgigu23nha --executePrereqs
dbaascli tde setKeyVersion --dbname dbname --pdbName pdb --kmsKeyVersionOCID ocid1.keyversion.oc1.eu-frankfurt-1.bjqnwclvaafak.bc4hmd3olgaaa.abtheljsyxtgn4vzi2bbpcej6a7abcwvylkd2lx56lu2s6iwnxwgigu23nha

dbaascli tde setPrimaryHsmKey

To change the primary HSM (KMS) key for the existing HSM (KMS) configuration, use the dbaascli tde setPrimaryHsmKey command.

Run the command as the root user.

Syntax

dbaascli tde setPrimaryHsmKey --primaryKmsKeyOCID <value> --dbname <value>
[--allStandbyPrepared]
[--bounceDatabase]
[--executePrereqs]
[--resume [--sessionID <value>]]
Where:
  • --primaryKmsKeyOCID specifies the primary KMS key to set
  • --dbname specifies the name of the database
  • --allStandbyPrepared specify to confirm that the operation has been successfully run on all the standby databases.
  • --bounceDatabase specify this flag to do rolling database bounce for this operation
  • --executePrereqs execute the prerequisites checks and report the results.
  • --resume to resume the previous execution
  • --sessionID to resume a specific session id.

Example 6-59 dbaascli tde setPrimaryHsmKey

dbaascli tde setPrimaryHsmKey --dbname dbname --primaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza
dbaascli tde setPrimaryHsmKey --dbname dbname --primaryKmsKeyOCID ocid1.key.oc1.eu-frankfurt-1.bjqnwclvaafak.abtheljsgfxa2xe5prvlzdxtygoiqpm2pu2afgta54krxwllk5uxainvvxza --executePrereqs

dbaascli tde status

To display information about the keystore for the specified database, use the dbaascli tde status command.

Prerequisite

Run the command as the oracle user.

Syntax

dbaascli tde status --dbname dbname
Where:
  • --dbname specifies the name of the database that you want to check.

Output from the command includes the type of keystore, and the status of the keystore.

Example 6-60 dbaascli tde status

dbaascli tde status --dbname dbname