Oracle Database CLI Reference

This topic is not applicable to Exadata DB systems.

The database command line interface (CLI) is available on 1-node and 2-node RAC DB systems. After you connect to the DB system, you can use the database CLI to perform tasks such as creating Oracle database homes and databases.

On April 20, 2017, the odacli CLI was renamed to dbcli and the odadmcli administrative CLI was renamed to dbadmcli. DB systems launched on or after that date will include the renamed CLIs.

For DB systems launched before April 20, 2017:

  • Use the cliadm update-dbcli command to get the dbcli.
  • Use the dbcli update-server command to get the dbadmcli.

The odacli and odadmcli CLIs will remain available on older DB systems for a while to ensure backward compatibility. However, those CLIs are no longer supported and you should begin using the newer CLIs.

Operational Notes

  • The dbcli commands must be run as the root user.

  • The dbcli is in the following directory:
    /opt/oracle/dcs/bin/

    The directory is included in the path for the root user's environment.

  • Oracle Database maintains logs of the dbcli command output in the dcscli.log and dcs-agent.log files in the following directory:

    /opt/oracle/dcs/log/

  • The CLI commands and most parameters are case sensitive and should be typed as shown. A few parameters are not case sensitive, as indicated in the parameter descriptions, and can be typed in uppercase or lowercase.

Syntax

The database CLI commands use the following syntax:

dbcli command [parameters]

where:

  • command is a verb-object combination such as create-database.
  • parameters include additional options for the command. Most parameter names are preceded with two dashes, for example, --help. Abbreviated parameter names are preceded with one dash, for example, -h.
  • User-specified parameter values are shown in red text within angle brackets, for example, <db_home_id>. Omit the angle brackets when specifying these values.
  • The help parameter is available with every command.

The remainder of this topic contains syntax and other details about the commands.

CLI Update Command

Occasionally, new commands are added to the database CLI and other commands are updated to support new features. You can use the following command to update the database CLI:

cliadm update-dbcli

Use the cliadm update-dbcli command to update the database CLI with the latest new and updated commands.

The cliadm update-dbcli command is not available on 2-node RAC DB systems.

Syntax

cliadm update-dbcli [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command updates the dbcli:

[root@dbsys ~]# cliadm update-dbcli
{
  "jobId" : "dc9ce73d-ed71-4473-99cd-9663b9d79bfd",
  "status" : "Created",
  "message" : "Dcs cli will be updated",
  "reports" : [ ],
  "createTimestamp" : "January 18, 2017 10:19:34 AM PST",
  "resourceList" : [ ],
  "description" : "dbcli patching",
  "updatedTime" : "January 18, 2017 10:19:34 AM PST"
}

Backup Command

Before you can back up a database by using the dbcli create-backup command, you'll need to:

  1. Create a backup configuration by using the dbcli create-backupconfig command.
  2. Associate the backup configuration to the database by using the dbcli update-database command.

Once a database is associated with a backup configuration, you can use the database's default backup schedule to run back up jobs automatically. For more information, see Schedule Commands.

dbcli create-backup

Use the dbcli create-backup command to create a backup of a database.

Syntax

dbcli create-backup -i <db_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid The ID of the database to back up. Use the dbcli list-databases command to get the database's ID.
-j --json (Optional) Displays JSON output.

Example

The following command creates a backup of the specified database.

[root@dbsys ~]# dbcli create-backup -i 573cadb2-0cc2-4c1c-9c31-595ab8963d5b

Backupconfig Commands

A backup configuration determines the backup destination and recovery window for database backups. You create the backup configuration and then associate it to a database by using the dbcli update-database command.

Once a database is associated with a backup configuration, you can use the database's default backup schedule to run back up jobs automatically. For more information, see Schedule Commands.

The following commands are available to manage backup configurations:

dbcli create-backupconfig

Use the dbcli create-backupconfig command to create a backup configuration that defines the backup destination and recovery windows.

Syntax

dbcli create-backupconfig -d {DISK|OBJECTSTORE|NONE} -c <bucket>  -o <object_store_swift_id> -w <n> -n <name> [-h] [-j]

Parameters

Parameter Full Name Description
-c --container

The name of an existing bucket in the Oracle Cloud Infrastructure Object Storage service. You can use the Console or the Object Storage API to create the bucket. For more information, see Managing Buckets.

You must also specify --backupdestination objectstore and the --objectstoreswiftId parameter.

-d --backupdestination

The backup destination as one of the following (these values are not case sensitive):

DISK - The local Fast Recovery Area.

OBJECTSTORE - The Oracle Cloud Infrastructure Object Storage service. You must also specify the --container and --objectstoreswiftId parameters.

The OBJECTSTORE destination is not available for 2-node RAC DB systems.

NONE - Disables the backup.

-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-n --name The name of the backup configuration.
-o --objectstoreswiftId

The ID of the object store that contains the endpoint and credentials for the Oracle Cloud Infrastructure Object Storage service. Use the dbcli list-objectstoreswifts command to get the object store ID. Use the dbcli create-objectstoreswift command to create an object store.

You must also specify --backupdestination objectstore and the --container parameter.

-w --recoverywindow

The number of days for which backups and archived redo logs are maintained. The interval always ends with the current time and extends back in time for the number of days specified.

For a DISK backup destination, specify 1 to 14 days.

For an OBJECTSTORE backup destination, specify 1 to 30 days.

Example

The following command creates a backup configuration named dbbkcfg1:

[root@dbsys ~]# dbcli create-backupconfig -d Disk -w 7 -n dbbkcfg1
{
  "jobId" : "4e0e6011-db53-4142-82ef-eb561658a0a9",
  "status" : "Success",
  "message" : null,
  "reports" : [ {
    "taskId" : "TaskParallel_919",
    "taskName" : "persisting backup config metadata",
    "taskResult" : "Success",
    "startTime" : "November 18, 2016 20:21:25 PM UTC",
    "endTime" : "November 18, 2016 20:21:25 PM UTC",
    "status" : "Success",
    "taskDescription" : null,
    "parentTaskId" : "TaskSequential_915",
    "jobId" : "4e0e6011-db53-4142-82ef-eb561658a0a9",
    "tags" : [ ],
    "reportLevel" : "Info",
    "updatedTime" : "November 18, 2016 20:21:25 PM UTC"
  } ],
  "createTimestamp" : "November 18, 2016 20:21:25 PM UTC",
  "description" : "create backup config:dbbkcfg1",
  "updatedTime" : "November 18, 2016 20:21:25 PM UTC"
}

dbcli list-backupconfigs

Use the dbcli list-backupconfigs command to list all the backup configurations in the DB system.

Syntax

dbcli list-backupconfigs [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command lists a backup configuration:

[root@dbsys ~]# dbcli list-backupconfigs


ID                                       Name                 RecoveryWindow     BackupDestination CreateTime
---------------------------------------- -------------------- ------------------ ----------------- -----------------------------
ccdd56fe-a40b-4e82-b38d-5f76c265282d     dbbkcfg1             7                  Disk              July 10, 2016 12:24:08 PM UTC
 

dbcli describe-backupconfig

Use the dbcli describe-backupconfig command to show details about a specific backup configuration.

Syntax

dbcli describe-backupconfig -i <id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --backupconfigid The backup configuration ID. Use the dbcli list-backupconfigs command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following command displays details about a backup configuration:

[root@dbsys ~]# dbcli describe-backupconfig -i ccdd56fe-a40b-4e82-b38d-5f76c265282d

Backup Config details
----------------------------------------------------------------
                     ID: ccdd56fe-a40b-4e82-b38d-5f76c265282d
                   Name: dbbkcfg1
         RecoveryWindow: 7
      BackupDestination: Disk
            CreatedTime: July 10, 2016 12:24:08 PM UTC
            UpdatedTime: July 10, 2016 12:24:08 PM UTC

dbcli update-backupconfig

Use the dbcli update-backupconfig command to update an existing backup configuration.

Syntax

dbcli update-backupconfig -i <id> -w <n> -d {DISK|OBJECTSTORE|NONE} -c <bucket>  -o <object_store_swift_id> [-h] [-j]

Parameters

Parameter Full Name Description
-c --container

The name of an existing bucket in the Oracle Cloud Infrastructure Object Storage service. You can use the Console or the Object Storage API to create the bucket. For more information, see Managing Buckets.

You must also specify --backupdestination objectstore and the --objectstoreswiftId parameter.

-d --backupdestination

The new backup destination, (these values are not case sensitive):

DISK - The local Fast Recovery Area.

OBJECTSTORE - The Oracle Cloud Infrastructure Object Storage service. You must also specify the --container and --objectstoreswiftId parameters. The OBJECTSTORE destination is not available for 2-node RAC DB systems.

NONE - Disables the backup.

-h --help (Optional) Displays help for using the command.
-i --backupconfigid The ID of the backup configuration to update. Use the dbcli list-backupconfigs command to get the ID.
-j --json (Optional) Displays JSON output.
-o --objectstoreswiftId

The ID of the object store that contains the endpoint and credentials for the Oracle Cloud Infrastructure Object Storage service. Use the dbcli list-objectstoreswifts command to get the object store ID. Use the dbcli create-objectstoreswift command to create an object store.

You must also specify --backupdestination objectstore and the --container parameter.

-w --recoverywindow

The new disk recovery window.

For a DISK backup destination, specify 1 to 14 days.

For an OBJECTSTORE backup destination, specify 1 to 30 days.

Example

The following command updates the recovery window for a backup configuration:

[root@dbsys ~]# dbcli update-backupconfig -i ccdd56fe-a40b-4e82-b38d-5f76c265282d -w 5
{
  "jobId" : "0e849291-e1e1-4c7a-8dd2-62b522b9b807",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1468153731699,
  "description" : "update backup config: dbbkcfg1",
  "updatedTime" : 1468153731700
}

dbcli delete-backupconfig

Use the dbcli delete-backupconfig command to delete a backup configuration.

Syntax

dbcli delete-backupconfig -i <id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id The backup configuration ID to delete. Use the dbcli list-backupconfigs command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following command deletes the specified backup configuration:

[root@dbsys ~]# dbcli delete-backupconfig -i ccdd56fe-a40b-4e82-b38d-5f76c265282d

Backupreport Commands

The following commands are available to manage backup reports:

dbcli create-rmanbackupreport

Use the dbcli create-rmanbackupreport command to create a backup report for a database.

Syntax

dbcli  create-rmanbackupreport -i <db_id> -in <db_name> -w {summary|detailed} -rn <report_name> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid The ID of the database to create the report for. This ID is different from the DBID. Use the dbcli list-databases command to get the database ID.
-in --dbname The name of the database to create the report for.
-j --json (Optional) Displays JSON output.
-w --reporttype The level of detail in the backup report as either summary or detailed.
-rn --rptname Specifies a name for this backup report.

Example

The following command creates a detailed backup report for the specified database:

[root@dbsys ~]# dbcli create-rmanbackupreport -i a892ced1-be04-436e-8e82-bf0a89109164 -w detailed

dbcli list-rmanbackupreports

Use the dbcli list-rmanbackupreports command to list backup reports.

Syntax

dbcli  list-rmanbackupreports -i <db_id> -in <db_name> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid (Optional) Displays the backup reports for the specified database ID. Use the dbcli list-databases command to get the database ID.
-in --dbname (Optional) Displays the backup reports for the specified database name.
-j --json (Optional) Displays JSON output.

Example

The following command lists the backup reports:

[root@dbsys ~]# dbcli list-rmanbackupreports

dbcli delete-rmanbackupreport

Use the dbcli delete-rmanbackupreport command to permanently delete one or more backup reports.

Syntax

dbcli  delete-rmanbackupreport -i <report_id> -in <report_name> -d <db_id> -dn <db_name> -n <number> [-h] [-j]

Parameters

Parameter Full Name Description
-d --dbid (Optional) The ID of the database for which you want to delete backup reports. This ID is different from the DBID. Use the dbcli list-databases command to get the database ID. Requires the --numofday parameter.
-dn --dbname The name of the database for which you want to delete backup reports.
-h --help (Optional) Displays help for using the command.
-i --reportid The ID of a specific backup report to delete. Use the dbcli list-rmanbackupreports command to get the ID.
--in --rptname The name of a specific backup report to delete.
-j --json (Optional) Displays JSON output.
-n --numofday (Optional) Deletes backup reports that are older than the specified number of days, for the specified database. Requires the --dbid parameter.

Example

The following command deletes the specified backup report:

[root@dbsys ~]# dbcli delete-rmanbackupreport -i a892ced1-be04-436e-8e82-bf0a89109164

dbcli describe-rmanbackupreport

Use the dbcli describe-rmanbackupreport command to display details about a backup report.

Syntax

dbcli  describe-rmanbackupreport -i <report_id> -in <report_name> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id The ID of the backup report. Use the dbcli list-rmanbackupreports command to get the ID.
-in --name The name of the backup report.
-j --json (Optional) Displays JSON output.

Example

The following command displays the specified backup report:

[root@dbsys ~]# dbcli describe-rmanbackupreport -i d7e5c172-a2cc-48a0-8ff3-93ed618645d9
Backup Report details
----------------------------------------------------------------
                     ID: d7e5c172-a2cc-48a0-8ff3-93ed618645d9
                   Name:
            Report Type: detailed
               Location: /opt/oracle/dcs/log/dbtst/rman/bkup/dbtst_phx1cs/rman_list_backup_detail/2016-11-18/rman_list_backup_detail_2016-11-18_20-41-50.0348.log
            Database ID: 80ad855a-5145-4f8f-a08f-406c5e4684ff
            CreatedTime: November 18, 2016 8:41:39 PM UTC
            UpdatedTime: November 18, 2016 8:41:53 PM UTC

Bmccredential Commands

The following commands are available to manage credentials configurations, which are required for downloading DB system patches from the Oracle Cloud Infrastructure Object Storage service. For more information, see Patching a DB System.

The bmccredential commands are not available on 2-node RAC DB systems.

dbcli create-bmccredential

Use the dbcli create-bmccredential command to create a credentials configuration.

Prerequisites

Before you can create a credentials configuration, you'll need these items:

Then you'll need to upload the public key in the Console. See How to Upload the Public Key.

Syntax

dbcli create-bmccredential -c [backup|patching|other] -t <tenant_ocid> -u <user_ocid>  -f <fingerprint> -k <private_key_path> -p <passphrase> [-e <object_store_url>] [-h] [-j]

Parameters

Parameter Full Name Description
-c --credentialsType

The type of Object Storage credentials configuration to create (these values are not case sensitive):

BACKUP - Reserved for the future use.

PATCHING - For downloading patches from the service.

OTHER - Reserved for the future use.

-e --objectStoreUrl

(Optional) The Object Storage endpoint URL.

Omit this parameter when --credentialsType PATCHING is specified. The following URL is assumed:

https://objectstorage.<region>.oraclecloud.com

-f --fingerPrint

The public key fingerprint. You can find the fingerprint in the Console by clicking your user name in the upper right corner and then clicking User Settings. The fingerprint looks something like this:

-f 61:9e:52:26:4b:dd:46:dc:8c:a8:05:6b:9f:0a:30:d2
-k --privateKey

The path to the private key file in PEM format, for example:

-k /root/.ssh/privkey
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-n --name (Optional) The name for the new credentials configuration. The name is useful for tracking the configuration.

-p

-hp

--passPhrase

The passphrase for the public/private key pair, if you specified one when creating the key pair.

Specify -p (with no passphrase) to be prompted.

Specify -hp <passphrase> to provide the passphrase in the command.

-t --tenantOcid

Your tenancy OCID. You can find the OCID in the Console, in the footer at the bottom of any page. The tenancy OCID looks something like this:

ocid1.tenancy.oc1..aaaaaaaaba3pv6wkcr4jqae5f44n2b2m2yt2j6rx32uzr4h25vqstifsfdsq
-u --userOcid

The user name OCID for your Oracle Cloud Infrastructure user account. You can find the OCID in the Console by clicking your user name in the upper right corner and then clicking User Settings. The user name OCID looks something like this:

ocid1.user.oc1..aaaaaaaalhdxviuxqi7xevqsksccl6edokgldvuf6raskcioq4x2z7watsfa

Example

The following command creates a credentials configuration:

[root@dbsys ~]# dbcli create-bmccredential -c patching -hp mypass -t ocid1.tenancy.oc1..aaaaaaaaba3pv6wkcr4jqae5f44n2b2m2yt2j6rx32uzr4h25vqstifsfdsq -u ocid1.user.oc1..aaaaaaaalhdxviuxqi7xevqsksccl6edokgldvuf6raskcioq4x2z7watsfa -f 60:9e:56:26:4b:dd:46:dc:8c:a8:05:6d:9f:0a:30:d2 -k /root/.ssh/privkey

{
  "jobId" : "f8c80510-b717-4ee2-a47e-cd380480b28b",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "December 26, 2016 22:46:38 PM PST",
  "resourceList" : [ ],
  "description" : "BMC Credentials Creation",
  "updatedTime" : "December 26, 2016 22:46:38 PM PST"
}

dbcli list-bmccredentials

Use the dbcli list-bmccredentials command to list the credentials configurations on the DB system.

Syntax

dbcli list-bmccredentials [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command lists the credentials configurations on the DB system:

[root@dbsys ~]# dbcli list-bmccredentials
    ID                                       Name           Type          End Point                                                    Status
    ---------------------------------------- -------------  ----------    ----------------------------------------------------------- ----------
    f19d7c8b-d0d5-4jhf-852b-eb2a81cb7ce5     patch1         Patching      https://objectstorage.us-phoenix-1.oraclecloud.com           Configured
    f1a8741c-b0c4-4jhf-239b-ab2a81jhfde4     patch2         Patching      https://objectstorage.us-phoenix-1.oraclecloud.com           Configured

dbcli describe-bmccredential

Use the dbcli describe-bmccredential command to display details about a credentials configuration.

Syntax

dbcli describe-bmccredential -i <credentials_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id

The ID for the credentials configuration. Use the dbcli list-bmccredentials command to get the ID.

-j --json (Optional) Displays JSON output.

Example

The following command displays details about the specified credentials configuration:

[root@dbsys ~]# dbcli describe-bmccredential -i 09f9988e-eed5-4dde-8814-890828d1c763

BMC Credentials details
----------------------------------------------------------------
                     ID: 09f9988e-eed5-4dde-8814-890678d1c763
                   Name: patch23
            Tenant OCID: ocid1.tenancy.oc1..aaaaaaaaba3pv6wkcr4jqae5f44n2b2m2yt2j6rx32uzr4h25vqstifsfdsq
              User OCID: ocid1.user.oc1..aaaaaaaalhjhfiuxqi7xevqsksccl6edokgldvuf6raskcioq4x2z7watjhf
       Credentials Type: Patching
        objectStore URL: https://objectstorage.us-phoenix-1.oraclecloud.com
                 Status: Configured
                Created: January 9, 2017 1:19:11 AM PST
            UpdatedTime: January 9, 2017 1:41:46 AM PST
    

dbcli delete-bmccredential

Use the dbcli delete-bmccredential command to delete a credentials configuration.

Syntax

dbcli delete-bmccredential -i <credentials_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id

The ID for the credentials configuration. Use the dbcli list-bmccredentials command to get the ID.

-j --json (Optional) Displays JSON output.

Example

The following command deletes the specified credentials configuration:

[root@dbsys ~]# dbcli delete-bmccredential -i f19d7c8b-d0d5-4jhf-852b-eb2a81cb7ce5        

dbcli update-bmccredential

Use the dbcli update-bmccredential command to update a credentials configuration.

Syntax

dbcli update-bmccredential -i <credentials_id> -c [backup|patching|other] -p <passphrase> -t <tenant_ocid> -u <user_ocid>  -f <fingerprint> -privateKey <private_key_path> [-h] [-j]

Parameters

Parameter Full Name Description
-c --credentialsType

The type of Object Storage credentials configuration (these values are not case sensitive):

BACKUP - Reserved for the future use.

PATCHING - For downloading patches from the service.

OTHER - Reserved for the future use.

-i --id

The ID for the credentials configuration. Use the dbcli list-bmccredentials command to get the ID.

-f --fingerPrint

The public key fingerprint, for example:

-f 61:9e:52:26:4b:dd:46:dc:8c:a8:05:6b:9f:0a:30:d2
-k --privateKey

The path to the private key file in PEM format, for example:

-k /root/.ssh/privkey
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

-p

-hp

--passPhrase

The passphrase for the public/private key pair, if you specified one when creating the key pair.

Specify -p (with no passphrase) to be prompted.

Specify -hp <passphrase> to provide the passphrase in the command.

Example

The following command updates a credentials configuration:

[root@dbsys ~]# dbcli update-bmccredential -c OTHER -i 6f921b29-61b6-56f4-889a-ce9270621956
{
  "jobId" : "6e95a69e-cf73-4e51-a444-c7e4b9631c27",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "January 19, 2017 12:01:10 PM PST",
  "resourceList" : [ ],
  "description" : "Update BMC Credentials of object 6f921b29-61b6-48f4-889a-ce9270621945",
  "updatedTime" : "January 19, 2017 12:01:10 PM PST"

 

Component Command

dbcli describe-component

Your DB system might not include this newer command. If you have trouble running the command, use the cliadm update-dbcli command to update the database CLI and then retry the command.

The dbcli describe-component command is not available on 2-node RAC DB systems. Patching 2-node systems from Object Storage is not supported.

Use the dbcli describe-component command to show the installed and available patch versions for the server, storage, and/or database home components in the DB system.

This command requires a valid Object Storage credentials configuration. Use the dbcli create-bmccredential command to create the configuration if you haven't already done so. If the configuration is missing or invalid, the command fails with the error: Failed to connect to the object store. Please provide valid details.

For more information about updating the CLI, creating the credentials configuration, and applying patches, see Patching a DB System.

Syntax

dbcli describe-component [-s <server_group>] [-d <db_group>] [-h] [-j]

Parameters

Parameter Full Name Description
-d --dbhomes (Optional) Lists the installed and available patch versions for only the database home components.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-s --server (Optional) Lists the installed and available patch versions for only the server components.

Example

The following command to show the current component versions and the available patch versions in the object store:

[root@dbsys ~]# dbcli describe-component
System Version
---------------
12.1.2.10.0

Component Name                           Installed Version    Available Version
---------------------------------------- -------------------- --------------------
OAK                                      12.1.2.10.0          up-to-date
GI                                       12.1.0.2.161018      up-to-date
ORADB12102_HOME1                         12.1.0.2.160719      12.1.0.2.161018  

Database Commands

The following commands are available to manage databases:

dbcli create-database

Use the dbcli create-database command to create a new database. You can create a database with a new or existing Oracle Database Home.

It takes a few minutes to create the database. After you run the dbcli create-database command, you can use the dbcli list-jobs command to check the status of the database creation job.

Wait for the database creation job to complete before you attempt to create another database. Running multiple dbcli create-database commands at the same time can result in some of the creation jobs not completing.

Once the database is created, you can use the dbcli list-databases -j command to see additional information about the database.

You must create and activate a master encryption key for any PDBs that you create. After creating or plugging in a new PDB on a 1- or 2-node RAC DB System, use the dbcli update-tdekey command to create and activate a master encryption key for the PDB. Otherwise, you might encounter the error ORA-28374: typed master key not found in wallet when attempting to create tablespaces in the PDB. In a multitenant environment, each PDB has its own master encryption key which is stored in a single keystore used by all containers. For more information, see "Overview of Managing a Multitenant Environment" in the Oracle Database Administrator’s Guide.

Syntax

dbcli create-database -dh <db_home_id>  -cl {OLTP|DSS|IMDB}  -n <db_name> -u <unique_name> -bi <bkup_config_id> -m -s <db_shape>  -r {ACFS|ASM}  -y {SI|RAC|RACOne} -io  -d <pdb_admin_user>  -p <pdb> -g n -ns <nlcharset> -cs <charset> -l <language> -dt<territory> -v <version> [-co|-no-co] [-h] [-j]

Parameters

Parameter Full Name Description
-bi --backupconfigid Defines the backup configuration identifier for future use. Use the dbcli list-backupconfigs command to get the ID.

-c

-no-c

--cdb

--no-cdb

(Optional) Indicates whether to create a Container Database. If omitted, a Container Database is not created.
-cs --characterset (Optional) Defines the character set for the database. The default is AL32UTF8.
-cl --dbclass

Defines the database class. The options are OLTP, DSS, or IMDB. The default is OLTP. For Enterprise Editions, all three classes are supported. For Standard Edition, only OLTP is supported.

-co

-no-co

--dbconsole

--no-dbconsole

(Optional) Indicates whether the Database Console is enabled. If omitted, the console is not enabled.

This parameter is not available for a version 11.2.0.4 database on a 2-node RAC DB system. For more information, see To enable the console for a version 11.2.0.4 database on a multi-node DB system .

-d --pdbadmin Defines the name of the Pluggable Database (PDB) Admin User. The default value is pdbadmin.
-l --dblanguage (Optional) Defines the language for the database. The default is AMERICAN.
-dt --dbterritory (Optional) Defines the territory for the database. The default is AMERICA.
-dh

--dbhomeid

 

Identifies a new or existing Database Home ID. To create a database with an existing db home, specify the db home id. Use the dbcli list dbhomes command to get the DB Home ID.

If this parameter is omitted, the database is created with a new oracle home.

-h --help (Optional) Displays help for the command.
-io --instanceonly

If this option is specified, it creates only the database storage structure and starts the database in nomount mode. No other database files are created. This is useful for database migration or creating a standby database.

-j --json (Optional) Displays JSON output.

-m

-hm

--adminpassword

A strong password for SYS, SYSTEM, TDE wallet, and PDB Admin. The password must be nine to thirty characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or -.

For Exadata DB systems, this password must not contain the name of the tenancy or any reserved words, such as "Oracle" or "Table," regardless of casing.

Specify -m (with no password) to be prompted for the password.

Specify -hm <password> to provide the password in the command.

-n --dbname Defines the name given to the new database. The database name must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
-ns --nlscharacterset (Optional) Defines the national character set for the database. The default is AL16UTF16.
-p --pdbname

(Optional) Defines a unique name for the PDB. The PDB name must begin with an alphabetic character and can contain a maximum of 30 alphanumeric characters. The only special character permitted is the underscore ( _). The default value is pdb1.

PDB names must be unique within a CDB and within the listener to which they are registered. Make sure the PDB name is unique on the system. To ensure uniqueness, do not use the default name value (pdb1).

-r --dbstorage

Defines the  database storage, either ACFS or ASM. The default value is ACFS.

See Usage Notes for more information.

-s --dbshape Identifies the database sizing template to use for the database. For example, odb1, odb2, or odb3. The default is odb1. For more information, see Database Sizing Templates.
-u --databaseUniqueName

Defines a unique name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name can contain only alphanumeric and underscore (_) characters. The unique name cannot be changed. The unique name defaults to the name specified in the --dbname parameter.

-v --version

Defines the database version as one of the following:

  • 18.1.0.0
  • 12.2.0.1
  • 12.1.0.2 (the default)
  • 11.2.0.4
-y --dbtype

Defines the database type. Specify SI for a 1-node instance, RAC for a 2-node cluster, or RACOne for 1-node instance with a second node in cold standby mode. The default value is RAC. These values are not case sensitive.

Usage Notes

  • You cannot mix Oracle Database Standard Edition and Enterprise Edition databases on the same DB system. (You can mix supported database versions on the DB system, but not editions.)
  • When --dbhomeid is not provided, the dbcli create-database command will create a new Oracle Database Home.
  • When --dbhomeid is provided, the dbcli create-database command creates the database using the existing Oracle Home. Use the dbcli list-dbhomes command to get the dbhomeid.
  • Oracle Database 12.1 or later databases are supported on both Oracle Automatic Storage Management (ASM) and Oracle ASM Cluster file system (ACFS). The default is Oracle ACFS.
  • Oracle Database 11.2 is supported on Oracle ACFS.
  • Each database is configured with its own Oracle ACFS file system for the datafiles and uses the following naming convention: /u02/app/db user/oradata/db name. The default size of this mount point is 100G.
  • Online logs are stored in the /u03/app/db user/redo/ directory.
  • The Oracle Fast Recovery Area (FRA) is located in the /u03/app/db user/fast_recovery_area directory.

Examples

To create database and be prompted for the password interactively:

[root@dbsys ~]# dbcli create-database -n hrdb -c -m -cl OLTP -s odb2 -p pdb1

Password for SYS,SYSTEM and PDB Admin:
{
   "jobId" : "f12485f2-dcbe-4ddf-aee1-de24d37037b6",
   "status" : "Created",
   "message" : null,
   "reports" : [ ],
   "createTimestamp" : "August 08, 2016 03:54:03 AM EDT",
   "description" : "Database service creation with db name: hrdb",
   "updatedTime" : "August 08, 2016 03:54:03 AM EDT"
}

To create database non-interactively, providing the password on the command line:

[root@dbsys ~]# dbcli create-database -n crmdb -hm WelCome#12 -cl OLTP -s odb2
{
   "jobId" : "30b5e2a6-493b-4461-98b8-78e9a15f8cdd",
   "status" : "Created",
   "message" : null,
   "reports" : [ ],
   "createTimestamp" : "August 08, 2016 03:59:22 AM EDT",
   "description" : "Database service creation with db name: crmdb",
   "updatedTime" : "August 08, 2016 03:59:22 AM EDT"
}

dbcli delete-database

Use the dbcli delete-database command to delete a database.

Syntax

dbcli  delete-database -i <db_id> [-j] [-h]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid Identifies the database ID to display. Use the dbcli list-databases command to get the database ID.
-j --json (Optional) Displays JSON output.

Example

The following command deletes the database named 625d9b8a-baea-4994-94e7-4c4a857a17f9:

[root@dbsys ~]# dbcli delete-database -i 625d9b8a-baea-4994-94e7-4c4a857a17f9

dbcli describe-database

Use the dbcli describe-database command to display database details.

Syntax

dbcli describe-database -i <db_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid Identifies the database ID to display. Use the dbcli list-databases command to get the database ID.
-j --json (Optional) Displays JSON output.

Example

The following command displays information for a database named b727bf80-c99e-4846-ac1f-28a81a725df6:

[root@dbsys ~]# dbcli describe-dbhome -i b727bf80-c99e-4846-ac1f-28a81a725df6

DB Home details
----------------------------------------------------------------
                      ID: b727bf80-c99e-4846-ac1f-28a81a725df6
                    Name: OraDB12102_home1
                 Version: 12.1.0.2
           Home Location: /u01/app/orauser/product/12.1.0.2/dbhome_1
                 Created: Jun 2, 2016 10:19:23 AM

dbcli list-databases

Use the dbcli list-databases command to list all databases on the DB system.

Syntax

dbcli  list-databases [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays a list of databases:

[root@dbsys ~]# dbcli  list-databases

ID DB Name DB Version CDB Class Shape Storage Status ---------------------------------------- ---------- -------------------- ---------- -------- -------- ---------- ---------- 80ad855a-5145-4f8f-a08f-406c5e4684ff dbst 12.1.0.2 true OLTP odb2 ACFS Configured 6f4e36ae-120b-4436-b0bf-d0c4aef9f7c9 db11tsta 11.2.0.4 false OLTP odb1 ACFS Configured d8e31790-84e6-479c-beb0-ef97207091a2 db11tstb 11.2.0.4 false OLTP odb1 ACFS Configured cce096c7-737b-447a-baa1-f4c2a330c030 pdbtst 12.1.0.2 true OLTP odb1 ACFS Configured

The following command displays the JSON output for a database:

[root@dbsys ~]# dbcli list-databases -j
[ {
  "id" : "80ad855a-5145-4f8f-a08f-406c5e4684ff",
  "name" : "dbtst",
  "dbName" : "dbtst",
  "databaseUniqueName" : "dbtst_phx1cs",
  "dbVersion" : "12.1.0.2",
  "dbHomeId" : "2efe7af7-0b70-4e9b-ba8b-71f11c6fe287",
  "instanceOnly" : false,
  "registerOnly" : false,
  "dbId" : "167525515",
  "isCdb" : true,
  "pdBName" : "pdb1",
  "pdbAdminUserName" : "pdbuser",
  "enableTDE" : true,
  "dbType" : "SI",
  "dbTargetNodeNumber" : "0",
  "dbClass" : "OLTP",
  "dbShape" : "odb2",
  "dbStorage" : "ACFS",
  "dbCharacterSet" : {
    "characterSet" : "US7ASCII",
    "nlsCharacterset" : "AL16UTF16",
    "dbTerritory" : "AMERICA",
    "dbLanguage" : "AMERICAN"
  },
  "dbConsoleEnable" : false,
  "backupConfigId" : null,
  "backupDestination" : "NONE",
  "cloudStorageContainer" : null,
  "state" : {
    "status" : "CONFIGURED"
  },
  "createTime" : "November 09, 2016 17:23:05 PM UTC",
  "updatedTime" : "November 09, 2016 18:00:47 PM UTC"
}

dbcli register-database

Use the dbcli register-database command to register a database that has been migrated to Oracle Cloud Infrastructure. The command registers the database to the dcs-agent so it can be managed by the dcs-agent stack.

The dbcli register-database command is not available on 2-node RAC DB systems.

Syntax

dbcli  register-database -bi <bkup_config_id> -c {OLTP|DSS|IMDB}  [-co|-no-co] -s {odb1|odb2|...}  -t SI -o <db_host_name>  -sn <service_name> -p [-h] [-j]

Parameters

Parameter Full Name Description
-bi --backupconfigid Defines the backup configuration ID. Use the dbcli list-backupconfigs command to get the ID.
-c --dbclass Defines the database class. The options are OLTP, DSS, or IMDB. The default is OLTP. For Enterprise Editions, all three classes are supported. For Standard Edition, only OLTP is supported.

-co

-no-co

--dbconsole

--no-dbconsole

(Optional) Indicates whether the Database Console is enabled or not. If omitted, the console is not enabled.

-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-o --hostname (Optional) Defines the database host name. The default is Local host name.
-p --syspassword

Defines a strong password for SYS. Specify -p with no password. You will be prompted for the password.

If you must provide the password in the command, for example in a script, use -hp <password> instead of -p.

-s --dbshape Defines the database sizing template to use for the database. For example, odb1, odb2, and odb3. For more information, see Database Sizing Templates.
-sn --servicename Defines the database service name used to build the EZCONNECT string for connecting to the database. The connect string format is hostname:port/servicename.
-t --dbtype (Optional) Defines the Database Type as single node (SI). The default value is SI.

Example

The following command registers the database with the specified database class, service name, and database sizing template.

[root@dbsys ~]# dbcli register-database -c OLTP -s odb1 -sn crmdb.example.com -p
Password for SYS:
{
  "jobId" : "317b430f-ad5f-42ae-bb07-13f053d266e2",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "August 08, 2016 05:55:49 AM EDT",
  "description" : "Database service registration with db service name: crmdb.example.com",
  "updatedTime" : "August 08, 2016 05:55:49 AM EDT"
}

dbcli update-database

Use the dbcli update-database command to associate a backup configuration with a database.

Syntax

dbcli  update-database -i <db_id> -bi <bkup_config_id> [-h] [-j]

Parameters

Parameter Full Name Description
-bi --backupconfigid Defines the backup configuration ID. Use the dbcli list-backupconfigs command to get the ID.
-h --help (Optional) Displays help for using the command.
-i --dbid Defines the database ID to be updated. Use the dbcli list-databases command to get the database ID.
-j --json (Optional) Displays JSON output.

Example

The following command associates a backup configuration file with a database:

[root@dbsys ~]# dbcli update-database -bi 78a2a5f0-72b1-448f-bd86-cf41b30b64ee -i 71ec8335-113a-46e3-b81f-235f4d1b6fde
{
  "jobId" : "2b104028-a0a4-4855-b32a-b97a37f5f9c5",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1467775842977,
  "description" : "update database id:71ec8335-113a-46e3-b81f-235f4d1b6fde",
  "updatedTime" : 1467775842978
}

Dbhome Commands

The following commands are available to manage database homes:

dbcli create-dbhome

Use the dbcli create-dbhome command to create an Oracle Database Home.

Syntax

dbcli create-dbhome -v <version> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-v --version

Defines the Database Home version. Specify one of the supported versions:

  • 18.1.0.0
  • 12.2.0.1
  • 12.1.0.2
  • 11.2.0.4

Example

The following command creates an Oracle Database Home version 12.1.0.2:

[root@dbsys ~]# dbcli  create-dbhome -v 12.1.0.2

dbcli describe-dbhome

Use the dbcli describe-dbhome command to display Oracle Database Home details.

Syntax

dbcli  describe-dbhome -i <db_home_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbhomeid Identifies the database home ID. Use the dbcli list-dbhomes command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following output is an example of using the display Oracle Database Home details command.

[root@dbsys ~]# dbcli describe-dbhome -i 52850389-228d-4397-bbe6-102fda65922b

DB Home details
----------------------------------------------------------------
                     ID: 52850389-228d-4397-bbe6-102fda65922b
                   Name: OraDB12102_home1
                Version: 12.1.0.2
          Home Location: /u01/app/oracle/product/12.1.0.2/dbhome_1
                Created: June 29, 2016 4:36:31 AM UTC

dbcli delete-dbhome

Use the dbcli delete-dbhome command to delete a database home from the DB system.

Syntax

dbcli  delete-dbhome -i <db_home_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbhomeid Identifies the database home ID to be deleted. Use the dbcli list-dbhomes command to get the ID.
-j --json (Optional) Displays JSON output.

dbcli list-dbhomes

Use the dbcli list-dbhomes command to display a list of Oracle Home directories.

Syntax

dbcli  list-dbhomes [-h] [-j]

Parameter

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays a list of Oracle Home directories.

[root@dbsys ~]# dbcli  list-dbhomes
ID                                   Name               DB Version Home Location
------------------------------------ -----------------  ---------- ------------------------------------------
b727bf80-c99e-4846-ac1f-28a81a725df6 OraDB12102_home1	 12.1.0.2  /u01/app/orauser/product/12.1.0.2/dbhome_1 

dbcli update-dbhome

Your DB system might not include this newer command. If you have trouble running the command, use the cliadm update-dbcli command to update the database CLI and then retry the command.

Use the dbcli update-dbhome command to apply the DBBP bundle patch to a database home. For more information about applying patches, see Patching a DB System.

Syntax

dbcli update-dbhome -i <db_home_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbhomeid The ID of the database home. Use the dbcli list-dbhomes command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following commands update the database home and show the output from the update job:

[root@dbsys ~]# dbcli update-dbhome -i e1877dac-a69a-40a1-b65a-d5e190e671e6
{
  "jobId" : "493e703b-46ef-4a3f-909d-bbd123469bea",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "January 19, 2017 10:03:21 AM PST",
  "resourceList" : [ ],
  "description" : "DB Home Patching: Home Id is e1877dac-a69a-40a1-b65a-d5e190e671e6",
  "updatedTime" : "January 19, 2017 10:03:21 AM PST"
}

# dbcli describe-job -i 493e703b-46ef-4a3f-909d-bbd123469bea

Job details
----------------------------------------------------------------
                     ID:  493e703b-46ef-4a3f-909d-bbd123469bea
            Description:  DB Home Patching: Home Id is e1877dac-a69a-40a1-b65a-d5e190e671e6
                 Status:  Running
                Created:  January 19, 2017 10:03:21 AM PST
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Create Patching Repository Directories   January 19, 2017 10:03:21 AM PST    January 19, 2017 10:03:21 AM PST    Success
Download latest patch metadata           January 19, 2017 10:03:21 AM PST    January 19, 2017 10:03:21 AM PST    Success
Update System version                    January 19, 2017 10:03:21 AM PST    January 19, 2017 10:03:21 AM PST    Success
Update Patching Repository               January 19, 2017 10:03:21 AM PST    January 19, 2017 10:03:31 AM PST    Success
Opatch updation                          January 19, 2017 10:03:31 AM PST    January 19, 2017 10:03:31 AM PST    Success
Patch conflict check                     January 19, 2017 10:03:31 AM PST    January 19, 2017 10:03:31 AM PST    Running   

Dbstorage Commands

The following commands are available to manage database storage:

dbcli list-dbstorages

Use the dbcli list-dbstorages command to list the database storage in the DB system.

Syntax

dbcli list-dbstorages [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays details about database storage:

[root@dbsys ~]# dbcli list-dbstorages

ID                                       Type   DBUnique Name        Status
---------------------------------------- ------ -------------------- ----------
afb4a1ce-d54d-4993-a149-0f28c9fb33a4     Acfs   db1_2e56b3a9b815     Configured
d81e8013-4551-4d10-880b-d1a796bca1bc     Acfs   db11xp               Configured

dbcli describe-dbstorage

Use the dbcli describe-dbstorage command to show detailed information about a specific database storage resource.

Syntax

dbcli describe-dbstorage -i <db_storage_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id Defines the database storage ID. Use the dbcli list-dbstorages command to get the database storage ID.
-j --json (Optional) Displays JSON output.

Example

The following command displays the database storage details for 105a2db2-625a-45ba-8bdd-ee46da0fd83a:

[root@dbsys ~]# dbcli describe-dbstorage -i 105a2db2-625a-45ba-8bdd-ee46da0fd83a

DBStorage details
----------------------------------------------------------------

                     ID: 105a2db2-625a-45ba-8bdd-ee46da0fd83a
                DB Name: db1
          DBUnique Name: db1
         DB Resource ID: 439e7bd7-f717-447a-8046-08b5f6493df0
           Storage Type:
          DATA Location: /u02/app/oracle/oradata/db1
          RECO Location: /u03/app/oracle/fast_recovery_area/
          REDO Location: /u03/app/oracle/redo/
                  State: ResourceState(status=Configured)
                Created: July 3, 2016 4:19:21 AM UTC
            UpdatedTime: July 3, 2016 4:41:29 AM UTC

dbcli create-dbstorage

Use the dbcli create-dbstorage command to create the database storage layout without creating the complete database. This is useful for database migration and standby database creation.

Syntax

dbcli create-dbstorage -n <db_name> -u <db_unique_name> -r {ACFS|ASM} -s <datasize> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-n --dbname Defines the database name. The database name must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
-r --dbstorage (Optional) Defines the type of database storage as ACFS or ASM. The default is ACFS.
-s

--dataSize

(Optional) Defines the data size in GBs. The minimum size is 10GB. The default size is 100GB.

-u --databaseUniqueName (Optional) Defines the unique name for the database. The default is the database name specified in --dbname.

Example

The following command creates database storage with a storage type of ACFS:

[root@dbsys ~]# dbcli create-dbstorage -r ACFS -n testdb -u testdbname

{
  "jobId" : "5884a77a-0577-414f-8c36-1e9d8a1e9cee",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1467952215102,
  "description" : "Database storage service creation with db name: testdb",
  "updatedTime" : 1467952215103
}

dbcli delete-dbstorage

Use the dbcli delete-dbstorage command to delete database storage that is not being used by the database. A error occurs if the resource is in use.

Syntax

dbcli delete-dbstorage -i <dbstorageID> [-h] [-j]

Parameters

Parameter Parameter Description
-h --help (Optional) Displays help for using the command.
-i --id The database storage ID to delete. Use the dbcli list-dbstorages command to get the database storage ID.
-j --json (Optional) Displays JSON output.

Example

The following command deletes the specified database storage:

[root@dbsys ~]# dbcli delete-dbstorage -i f444dd87-86c9-4969-a72c-fb2026e7384b

{
  "jobId" : "467c9388-18c6-4e1a-8655-2fd3603856ef",
  "status" : "Running",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1467952336843,
  "description" : "Database storage service deletion with id: f444dd87-86c9-4969-a72c-fb2026e7384b",
  "updatedTime" : 1467952336856
}

Dbsystem Command

dbcli describe-dbsystem

Use the dbcli describe-dbsystem command to display details about the DB system. On a 2-node RAC DB system, the command provides information about the local node.

Syntax

dbcli describe-dbsystem [-d] [-h] [-j]

Parameters

Parameter Full Name Description

-d

--details

Displays additional information about the DB system, including dcs CLI and agent version information.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays detailed information about the DB system:

[root@dbsys ~]# dbcli describe-dbsystem  -d

Appliance Information
----------------------------------------------------------------
                     ID: a083a81b-d204-4aae-a891-31eccaa92be6
               Platform: BmIaaSSi
        Data Disk Count: 4
         CPU Core Count: 36
                Created: September 2, 2016 4:03:47 PM UTC

System Information
----------------------------------------------------------------
                   Name: wdcxgd5a
            Domain Name: asdfasdfasdf.asdfdfasdfasdfasdf.fasdisdfkkfasd.com
              Time Zone: UTC
             DB Edition: SE
            DNS Servers:
            NTP Servers:

Disk Group Information
----------------------------------------------------------------
DG Name                   Redundancy                Percentage
------------------------- ------------------------- ------------
Data                      High                      70
Reco                      High                      30


DcsCli Details
----------------------------------------------------------------
 Implementation-Version: jenkins-dcs-cli-350
       Archiver-Version: Plexus Archiver
               Built-By: aime
             Created-By: Apache Maven 3.3.9
              Build-Jdk: 1.8.0_92
      Implementation-Id: b5413850b54fdf330231c0ae4b761fa4c364c5bc
       Manifest-Version: 1.0
             Main-Class: com.oracle.oda.dcscli.DcsCli

DcsAgent Details
----------------------------------------------------------------
                Version: 1.0-SNAPSHOT
            BuildNumber: jenkins-dcs-agent-426
              GitNumber: 366ec7fd136670781ea5e8345cc2f5272474deef
              BuildTime: 2016-09-02_1627 UTC

Job Commands

The following commands are available to manage jobs:

dbcli describe-job

Use the dbcli describe-job command to display details about a specific job.

Syntax

dbcli describe-job -i <job_id> [-h] [-j] 

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --jobid Identifies the job. Use the dbcli list-jobs command to get the jobid.
-j --json (Optional) Displays JSON output.

Example

The following command displays details about the specified job ID:

[root@dbsys ~]# dbcli describe-job -i 74731897-fb6b-4379-9a37-246912025c17

Job details
----------------------------------------------------------------
                     ID:  74731897-fb6b-4379-9a37-246912025c17
            Description:  Backup service creation with db name: dbtst
                 Status:  Success
                Created:  November 18, 2016 8:33:04 PM UTC
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Backup Validations                       November 18, 2016 8:33:04 PM UTC    November 18, 2016 8:33:13 PM UTC    Success
validate recovery window                 November 18, 2016 8:33:13 PM UTC    November 18, 2016 8:33:17 PM UTC    Success
Db cross check                           November 18, 2016 8:33:17 PM UTC    November 18, 2016 8:33:23 PM UTC    Success
Database Backup                          November 18, 2016 8:33:23 PM UTC    November 18, 2016 8:34:22 PM UTC    Success
Backup metadata                          November 18, 2016 8:34:22 PM UTC    November 18, 2016 8:34:22 PM UTC    Success

dbcli list-jobs

Use the dbcli list-jobs command to display a list of jobs, including the job IDs, status, and the job

created date and time stamp.

Syntax

dbcli list-jobs [-h] [-j] 

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays a list of jobs:

[root@dbsys ~]# dbcli list-jobs

ID                                       Description                                                                 Created                             Status
---------------------------------------- --------------------------------------------------------------------------- ----------------------------------- ----------
0a362dac-0339-41b5-9c9c-4d229e363eaa     Database service creation with db name: db11                                November 10, 2016 11:37:54 AM UTC   Success
9157cc78-b487-4ee9-9f46-0159f10236e4     Database service creation with db name: jhfpdb                              November 17, 2016 7:19:59 PM UTC    Success
013c408d-37ca-4f58-a053-02d4efdc42d0     create backup config:myBackupConfig                                         November 18, 2016 8:28:14 PM UTC    Success
921a54e3-c359-4aea-9efc-6ae7346cb0c2     update database id:80ad855a-5145-4f8f-a08f-406c5e4684ff                     November 18, 2016 8:32:16 PM UTC    Success
74731897-fb6b-4379-9a37-246912025c17     Backup service creation with db name: dbtst                                 November 18, 2016 8:33:04 PM UTC    Success
40a227b1-8c47-46b9-a116-48cc1476fc12     Creating a report for database 80ad855a-5145-4f8f-a08f-406c5e4684ff         November 18, 2016 8:41:39 PM UTC    Success

Latestpatch Command

dbcli describe-latestpatch

Your DB system might not include this newer command. If you have trouble running the command, use the cliadm update-dbcli command to update the database CLI and then retry the command.

The dbcli describe-latestpatch command is not available on 2-node RAC DB systems. Patching 2-node systems from Object Storage is not supported.

Use the dbcli describe-latestpatch command show the latest patches applicable to the DB system and available in Oracle Cloud Infrastructure Object Storage.

This command requires a valid Object Storage credentials configuration. Use the dbcli create-bmccredential command to create the configuration if you haven't already done so. If the configuration is missing or invalid, the command fails with the error: Failed to connect to the object store. Please provide valid details.

For more information about updating the CLI, creating the credentials configuration, and applying patches, see Patching a DB System.

Syntax

dbcli describe-latestpatch [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays patches available in the object store:

[root@dbsys ~]# dbcli describe-latestpatch

componentType   availableVersion
--------------- --------------------
gi              12.1.0.2.161018
db              11.2.0.4.161018
db              12.1.0.2.161018
oak             12.1.2.10.0        

Netsecurity Commands

The following commands are available to manage network encryption on the DB system:

dbcli describe-netsecurity

Use the dbcli describe-netsecurity command to display the current network encryption setting for a database home.

Syntax

dbcli describe-netsecurity -H <db_home_id> [-h] [-j]

Parameters

Parameter Full Name Description
-H --dbHomeId Defines the database home ID. Use the dbcli list-dbhomes command to get the dbhomeid.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays the encryption setting for specified database home:

[root@dbsys ~]# dbcli describe-netsecurity -H 16c96a9c-f579-4a4c-a645-8d4d22d6889d

NetSecurity Rules
----------------------------------------------------------------
         DatabaseHomeID: 16c96a9c-f579-4a4c-a645-8d4d22d6889d

                   Role: Server
   EncryptionAlgorithms: AES256 AES192 AES128
    IntegrityAlgorithms: SHA1
         ConnectionType: Required

                   Role: Client
   EncryptionAlgorithms: AES256 AES192 AES128
    IntegrityAlgorithms: SHA1
         ConnectionType: Required

dbcli update-netsecurity

Use the dbcli update-netsecurity command to update the Oracle Net security configuration on the DB system.

Syntax

dbcli update-netsecurity {-c|-s} -t {REJECTED|ACCEPTED|REQUESTED|REQUIRED} -H db_home_id> -e {AES256|AES192|AES128} -i {SHA1|SHA512|SHA384|SHA256} [-h] [-j]

Parameters

Parameter Full Name Description
-c --client

Indicates that the specified data encryption or data integrity configuration is for the client. (--client and --server are mutually exclusive.)

-e -- encryptionAlgorithms Defines the algorithm to be used for encryption. Specify either AES256, AES192, or AES128.
-H --dbHomeId Defines the database home ID. Use the dbcli list-dbhomes command to get the dbHomeId.
-h --help (Optional) Displays help for using the command.
-i --integrityAlgorithms Defines the algorithm to be used for integrity. Specify either SHA1, SHA512, SHA384, or SHA256. For Oracle Database 11g, the only accepted value is SHA1.
-j --json (Optional) Displays JSON output.
-s --server Indicates that the specified data encryption or data integrity configuration is for the server. (--client and --server are mutually exclusive.)
-t --connectionType

Specifies how Oracle Net Services data encryption or data integrity is negotiated with clients. The following values are listed in the order of increasing security:

REJECTED - Do not enable data encryption or data integrity, even if required by the client.

ACCEPTED - Enable data encryption or data integrity if required or requested by the client.

REQUESTED - Enable data encryption or data integrity if the client permits it.

REQUIRED - Enable data encryption or data integrity or preclude the connection.

For detailed information about network data encryption and integrity, see https://docs.oracle.com/database/121/DBSEG/asoconfg.htm#DBSEG1047.

Example

The following command updates the connection type to ACCEPTED:

[root@dbsys ~]# dbcli update-netsecurity -H a2ffbb07-c9c0-4467-a458-bce4d3b76cd5 -t ACCEPTED

Objectstoreswift Commands

You can back up a database to an existing bucket in the Oracle Cloud Infrastructure Object Storage service by using the dbcli create-backup command, but first you'll need to:

  1. Create an object store on the DB system, which contains the endpoint and credentials to access Object Storage, by using the dbcli create-objectstoreswift command.
  2. Create a backup configuration that refers to the object store ID and the bucket name by using the dbcli create-backupconfig command.
  3. Associate the backup configuration to the database by using the dbcli update-database command.

The following commands are available to manage object stores.

The objectstoreswift commands are not available on 2-node RAC DB systems.

dbcli create-objectstoreswift

Use the dbcli create-objectstoreswift command to create an object store.

Syntax

dbcli create-objectstoreswift -n <object_store_name> -t <tenant_name> -u <user_name> -e https://swiftobjectstorage.<region>.oraclecloud.com/v1 -p [-h] [-j]

Parameters

Parameter Full Name Description
-e --endpoint

The following endpoint URL.

https://swiftobjectstorage.<region>.oraclecloud.com/v1

-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-n --name

The name for the object store to be created.

-p --swiftpassword

The auth token that you generated by using the Console or IAM API. For information about generating an auth token for use with Swift, see Managing User Credentials.

This is not the password for the Oracle Cloud Infrastructure user.

Specify -p (with no password) to be prompted.

Specify -hp "<password> " in quotes to provide the password (auth token) in the command.

-t --tenantname The case-sensitive tenant name that you specify when signing in to the Console.
-u --username The user name for the Oracle Cloud Infrastructure user account, for example:

-u djones@mycompany.com

This is the user name you use to sign in to the Console.

The user name must have tenancy-level access to the Object Storage. An easy way to do this is to add the user name to the Administrators group. However, that allows access to all of the cloud services. Instead, an administrator can create a policy that allows tenancy-level access to just Object Storage. The following is an example of such a policy.

Allow group DBAdmins to manage buckets in tenancy

Allow group DBAdmins to manage objects in tenancy

For more information about adding a user to a group, see Managing Groups. For more information about policies, see Getting Started with Policies.

Example

The following command creates an object store and prompts for the Swift password:

[root@dbsys ~]# dbcli create-objectstoreswift -n r2swift -t CompanyABC -u djones@mycompany.com -e https://swiftobjectstorage.<region>.oraclecloud.com/v1 -p
Password for Swift:
{
  "jobId" : "c565bb71-f67b-4fab-9d6f-a34eae36feb7",
  "status" : "Created",
  "message" : "Create object store swift",
  "reports" : [ ],
  "createTimestamp" : "January 19, 2017 11:11:33 AM PST",
  "resourceList" : [ {
    "resourceId" : "8a0fe039-f5d4-426a-8707-256c612b3a30",
    "resourceType" : "ObjectStoreSwift",
    "jobId" : "c565bb71-f67b-4fab-9d6f-a34eae36feb7",
    "updatedTime" : "January 19, 2017 11:11:33 AM PST"
  } ],
  "description" : "create object store:biyanr2swift",
  "updatedTime" : "January 19, 2017 11:11:33 AM PST"
}

dbcli describe-objectstoreswift

Use the dbcli describe-objectstoreswift command to display details about an object store.

Syntax

dbcli describe-objectstoreswift -i <object_store_swift_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --objectstoreswiftid The object store ID. Use the dbcli list-objectstoreswifts command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following command displays details about an object store:

[root@dbsys ~]# dbcli describe-objectstoreswift -i 910e9e2d-25b4-49b4-b88e-ff0332f7df87
Object Store details
----------------------------------------------------------------
                     ID: 910e9e2d-25b4-49b4-b88e-ff0332f7df87
                   Name: objstrswift15
               UserName: djones@mycompany.com
             TenantName: CompanyABC
           endpoint URL: https://swiftobjectstorage.<region>.oraclecloud.com/v1
            CreatedTime: November 16, 2016 11:25:34 PM UTC
            UpdatedTime: November 16, 2016 11:25:34 PM UTC

dbcli list-objectstoreswifts

Use the dbcli list-objectstoreswifts command to list the object stores on a DB system.

Syntax

dbcli list-objectstoreswifts [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command lists the object stores on the DB system:

[root@dbsys ~]# dbcli list-objectstoreswifts

ID                                       Name                 UserName              TenantName     Url                                                         createTime
---------------------------------------- -------------------- --------------------  -------------- ------ ---------------------------------------------------- -----------------------------------
2915bc6a-6866-436a-a38c-32302c7c4d8b     swiftobjstr1         djones@mycompany.com  CompanyABC     https://swiftobjectstorage.<region>.oraclecloud.com/v1 November 10, 2016 8:42:18 PM UTC
910e9e2d-25b4-49b4-b88e-ff0332f7df87     objstrswift15        djones@mycompany.com  CompanyABC     https://swiftobjectstorage.<region>.oraclecloud.com/v1 November 16, 2016 11:25:34 PM UTC

Recovery Commands

The following commands are available to initiate a database recovery and list recovery jobs:

dbcli create-recovery

Use the dbcli create-recovery command to initiate database recovery.

Syntax

dbcli  create-recovery -i <db_id> -r <timestamp>  -t {Latest|PITR|SCN} -s <scn> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbid Defines the ID of the database to recover. Use the dbcli list-databases command to get the database's ID.
-j --json (Optional) Displays JSON output.
-r --recoveryTimeStamp Defines the time for the end point of the recovery. The format is MM/DD/YYYY HH24:MI:SS, for example, 08/09/2016 05:12:15.
-s -scn Defines the system change number (SCN) for the end point of the recovery, when the specified recovery type is SCN.
-t --recoverytype

Defines the type of recovery to be performed:

PITR - Indicates that a database point-in-time (incomplete) recovery should be performed. The recovery end point is specified by the -s or -r option.

Latest - Indicates that a complete database recovery should be performed.

SCN - Indicates that the recovery is based on the system change number.

Example

The following command initiates a complete recovery of the specified database:

[root@dbsys ~]# dbcli create-recovery -i 5a3e980b-e0fe-4909-9628-fcefe43b3326 -t Latest
{
  "jobId" : "c9f81228-2ce9-43b4-88f6-b260d398cf06",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "August 08, 2016 18:20:47 PM UTC",
  "description" : "Create recovery for database id :5a3e980b-e0fe-4909-9628-fcefe43b3326",
  "updatedTime" : "August 08, 2016 18:20:47 PM UTC"
}

The following command initiates a point-in-time recovery of the specified database:

dbcli create-recovery -i d4733796-dbea-4155-8606-24a85d64bd74 -t PITR -r 08/09/2016 5:12:15

dbcli list-recovery

Use the dbcli list-recovery command to see information about recovery jobs.

Syntax

dbcli  list-recovery [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays information about the recovery jobs:

[root@dbsys ~]# dbcli list-recovery

Schedule Commands

You can run back up jobs automatically by using backup schedules. A default backup schedule is automatically created for every database that is associated with a backup configuration. The backup configuration controls the backup destination and recovery window. The schedule uses a cron expression to control when and how often the back up job runs. The default cron expression is 0 2 4 1/1 * ? *, so the back up job is scheduled to run daily at 4:02 AM. You can update the cron expression as needed using the dbcli update-schedule command. You can use a cron utility such as the CronMaker utility to help build expressions. For more information, see http://www.cronmaker.com.

Each database also has a metastore maintenance backup schedule. This schedule is used internally by the DB system and must not be updated.

The following commands are available to manage backup schedules:

dbcli list-schedules

Use the dbcli list-schedules command to list backup schedules.

Syntax

dbcli list-schedules [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command displays backup schedules:

[root@dbsys ~]# dbcli list-schedules

ID                                       Name                      Description                                        CronExpression

---------------------------------------- ------------------------- -------------------------------------------------- ------------------------------
fe46697b-128e-43b4-9f7a-8e4a5f16e88c     metastore maintenance     internal metastore maintenance                     0 0 0 1/1 * ? *

481856f9-2cdd-45f8-b0b0-11cc8c48970a     database backup           backup databases                                   0 9 13 1/1 * ? *
 

dbcli describe-schedule

Use the dbcli describe-schedule command to list information about a schedule.

Syntax

dbcli describe-schedule -i <schedule_id> [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-i --scheduleid The schedule ID. Use the dbcli list-schedules command to get the ID.

Example

The following command describes a backup schedule:

[root@dbsys ~]# dbcli describe-schedule -i 481856f9-2cdd-45f8-b0b0-11cc8c48970a

Job Schedule details
----------------------------------------------------------------
                     ID:  481856f9-2cdd-45f8-b0b0-11cc8c48970a
                JobName:  database backup
               JobGroup:  backups
         CronExpression:  0 9 13 1/1 * ? *
               JobClass:  com.oracle.dcs.agent.schedule.AutoBackupJob
            UpdatedTime:  September 1, 2016 9:22:50 PM UTC
            Description:  backup databases
                Disable:  false     

dbcli update-schedule

Use the dbcli update-schedule command to enable or disable a schedule, or update the cron expression that controls when and how frequently the job is scheduled. You can use the CronMaker utility to help build cron expressions. For more information, see http://www.cronmaker.com.

Do not update the metastore maintenance schedule. This schedule is used internally by the DB system.

Syntax

dbcli update-schedule -i <schedule_id> -x '<cron_expression>' -t <description> [-d|-e] [-h] [-j]

Parameters

Parameter Full Name Description

-d

-e

--disable

--enable

Indicates whether the schedule is disabled or enabled.
-h --help (Optional) Displays help for using the command.
-i --scheduleid The schedule ID. Use the dbcli list-schedules command to get the ID.
-j --json (Optional) Displays JSON output.
-t --description A description of the schedule.
-x --cronExpression The cron expression, in single quotes, used by the schedule.

Example

The following command updates the backup schedule to run daily at 12:00 by updating the cron expression to '0 0 12 1/1 * ? *'.

[root@dbsys ~]# dbcli update-schedule -i 481856f9-2cdd-45f8-b0b0-11cc8c48970a -x '0 0 12 1/1 * ? *'

Update job schedule success    

You can use the dbcli describe-schedule command to get more information about the update.

dbcli list-scheduledExecutions

Use the dbcli list-scheduledExecutions command to list the jobs that have been executed by existing schedules.

Syntax

dbcli list-scheduledExecutions -i <schedule_id>  -e <execution_id> [-h] [-j]

Parameters

Parameter Full Name Description
-e --executionid (Optional) An execution ID.
-h --help (Optional) Displays help for using the command.
-i --scheduleid (Optional) The schedule ID. Use the dbcli list-schedules command to get the ID.
-j --json (Optional) Displays JSON output.

Example

The following command lists all the jobs executed for all schedules:

[root@dbsys ~]# dbcli list-scheduledExecutions

ID                                     ScheduledId                            JobId                                  Status    Executed Time
-------------------------------------- -------------------------------------- -------------------------------------- --------- -------------------------------
23691445-9120-4a34-9bcd-dcbd382dc455   22fbd334-ebbd-40f4-af79-9eb2360cfb77    c7f32a6c-f835-45f8-a5ef-ff04473d3a73  Executed  September 5, 2016 8:52:00 PM UTC
54071c4e-98db-41c8-92b6-b5f92ca11631   a7623340-ece7-4618-a7d9-8efb353378b4    b663fb73-e531-43bf-9939-0b404b62e8ce  Executed  September 6, 2016 12:00:00 AM UTC

Note the JobID in the command output. You can use the dbcli describe-job with the JobID to get more information about the job.

Server Command

dbcli update-server

Your DB system might not include this newer command. If you have trouble running the command, use the cliadm update-dbcli command to update the database CLI and then retry the command.

Use the dbcli update-server command to apply patches to the server components in the DB system. For more information about applying patches, see Patching a DB System.

The dbcli update-server command is not available on 2-node RAC DB systems.

Syntax

dbcli update-server [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following commands update the server and show the output from the update job:

[root@dbsys ~]# dbcli update-server
{
  "jobId" : "9a02d111-e902-4e94-bc6b-9b820ddf6ed8",
  "status" : "Created",
  "reports" : [ ],
  "createTimestamp" : "January 19, 2017 09:37:11 AM PST",
  "resourceList" : [ ],
  "description" : "Server Patching",
  "updatedTime" : "January 19, 2017 09:37:11 AM PST"
}

# dbcli describe-job -i 9a02d111-e902-4e94-bc6b-9b820ddf6ed8

Job details
----------------------------------------------------------------
                     ID:  9a02d111-e902-4e94-bc6b-9b820ddf6ed8
            Description:  Server Patching
                 Status:  Running
                Created:  January 19, 2017 9:37:11 AM PST
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Create Patching Repository Directories   January 19, 2017 9:37:11 AM PST     January 19, 2017 9:37:11 AM PST     Success
Download latest patch metadata           January 19, 2017 9:37:11 AM PST     January 19, 2017 9:37:11 AM PST     Success
Update System version                    January 19, 2017 9:37:11 AM PST     January 19, 2017 9:37:11 AM PST     Success
Update Patching Repository               January 19, 2017 9:37:11 AM PST     January 19, 2017 9:38:35 AM PST     Success
oda-hw-mgmt upgrade                      January 19, 2017 9:38:35 AM PST     January 19, 2017 9:38:58 AM PST     Success
Opatch updation                          January 19, 2017 9:38:58 AM PST     January 19, 2017 9:38:58 AM PST     Success
Patch conflict check                     January 19, 2017 9:38:58 AM PST     January 19, 2017 9:42:06 AM PST     Success
apply clusterware patch                  January 19, 2017 9:42:06 AM PST     January 19, 2017 10:02:32 AM PST    Success
Updating GiHome version                  January 19, 2017 10:02:32 AM PST    January 19, 2017 10:02:38 AM PST    Success    

TDE Command

dbcli update-tdekey

Use the dbcli update-tdekey command to update the TDE encryption key inside the TDE wallet. You can update the encryption key for Pluggable Databases (if -pdbNames are specified), and/or the Container Database (if -rootDatabase is specified).

Syntax

dbcli update-tdekey -i <db_id> -p -n <pdbname1,pdbname2> [-r|-no-r] -t <tag_name> [-h] [-j]

Parameters

Parameter Full Name Description
-i --dbid

Defines the database ID for which to update the key.

-p --password

Defines the TDE Admin wallet password. Specify -p with no password. You will be prompted for the password.

If you must provide the password in the command, for example in a script, use -hp <password> instead of -p.

-n --pdbNames Defines the PDB names to be rotated.

-r

-no-r

--rootDatabase

--no-rootDatabase

Indicates whether to rotate the key for the root database if it is a container database.
-t -tagName Defines the TagName used to backup the wallet. The default is OdaRotateKey.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Example

The following command updates the key for pdb1 and pdb2 only:

[root@dbsys ~]# dbcli update-tdekey -dbid ee3eaab6-a45b-4e61-a218-c4ba665503d9 -p -n pdb1,pdb2

TDE Admin wallet password:
{
  "jobId" : "08e5edb1-42e1-4d16-a47f-783c0afa4778",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1467876407035,
  "description" : "TDE update",
  "updatedTime" : 1467876407035
}

The following command updates pdb1, pdb2, and the container database:

[root@dbsys ~]# dbcli update-tdekey -dbid ee3eaab6-a45b-4e61-a218-c4ba665503d9 -p -n pdb1,pdb2 -r

TDE Admin wallet password:
{
  "jobId" : "c72385f0-cd81-42df-a8e8-3a1e7cab1278",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : 1467876433783,
  "description" : "TDE update",
  "updatedTime" : 1467876433783
}

Admin Commands

The following commands are to perform administrative actions on the DB system:

dbadmcli manage diagcollect

Use the dbadmcli manage diagcollect command to collect diagnostic information about a DB system for troubleshooting purposes, and for working with Oracle Support Services.

Syntax

dbadmcli manage diagcollect --storage

Parameters

Parameter Description
-h (Optional) Displays help for using the command.
--storage Collects all of the logs for any storage issues.

Example

[root@dbsys ~]# dbadmcli manage diagcollect --storage
Collecting storage log data. It will take a while, please wait...
Collecting oak data. It will take a while, please wait...
tar: Removing leading `/' from member names
tar: /opt/oracle/oak/onecmd/tmp/OakCli-Command-Output.log: file changed as we read it

Logs are collected to : /opt/oracle/oak/log/dbsys/oakdiag/oakStorage-dbsys-20161118_2101.tar.gz

dbadmcli power

Use the dbadmcli power command to power a disk on or off.

The dbadmcli power command is not available on 2-node RAC DB systems.

Syntax

dbadmcli  power {-on|-off}  <name>   [-h]

Parameters

Parameter Description
-h (Optional) Displays help for using the command.
name Defines the disk resource name. The resource name format is pd_[0..3]. Use the dbadmcli show disk command to get the disk resource name.
-off Powers off the disk.
-on Powers on the disk.

dbadmcli power disk status

Use the dbadmcli power disk status command to display the current power status of a disk.

Syntax

dbadmcli power disk status <name>

Parameters

Parameter Description
-h (Optional) Displays help for using the command.
name Identifies a specific disk resource name. The resource name format is pd_[0..3]. For example, pd_01.

Example

[root@dbsys ~]# dbadmcli power disk status pd_00

The disk is powered ON

dbadmcli show controller

Use the dbadmcli show controller command to display details of the controller.

Syntax

dbadmcli show controller <controller_id> [-h]

Parameter

Parameter Description
controller_id The ID number of the controller. Use the dbadmcli show storage command to get the ID.
-h (Optional) Displays help for using the command.

dbadmcli show disk

Use the dbadmcli show disk command to display the status of a single disk or all disks on the DB system.

Syntax

dbadmcli show disk <name> [-shared] [-all] [-getlog]

Parameters

Parameter Description
-all (Optional) Displays detailed information for the named disk.
-h (Optional) Displays help for using the command.
-getlog (Optional) Displays all the SMART log entries for an NVMe disk.
name

(Optional) Identifies a specific disk resource name. The resource name format is pd_[0..3]. If omitted, the command displays information about all disks on the system.

-shared (Optional) Displays all the shared disks.

Examples

To display the status of all the disks on the system:

[root@dbsys ~]# dbadmcli show disk
	NAME           	PATH           	TYPE           	STATE          	STATE_DETAILS

	pd_00          	/dev/nvme2n1   	NVD            	ONLINE         	Good
	pd_01          	/dev/nvme3n1   	NVD            	ONLINE         	Good
	pd_02          	/dev/nvme1n1   	NVD            	ONLINE         	Good
	pd_03          	/dev/nvme0n1   	NVD            	ONLINE         	Good

To display the status of a disk named pd_00:

[root@dbsys ~]# dbadmcli show disk pd_00
The Resource is : pd_00
	ActionTimeout   :	1500
	ActivePath      :	/dev/nvme2n1
	AsmDiskList     :	|data_00||reco_00|
	AutoDiscovery   :	1
	AutoDiscoveryHi :	|data:70:NVD||reco:30:NVD|
	CheckInterval   :	300
	ColNum          :	0
	CriticalWarning :	0
	DependListOpr   :	add
	Dependency      :	|0|
	DiskId          :	360025380144d5332
	DiskType        :	NVD
	Enabled         :	1
	ExpNum          :	29
	HbaPortNum      :	10
	IState          :	0
	Initialized     :	0
	IsConfigDepende :	false
	ModelNum        :	MS1PC2DD3ORA3.2T
	MonitorFlag     :	1
	MultiPathList   :	|/dev/nvme2n1|
	Name            :	pd_00
	NewPartAddr     :	0
	OSUserType      :	|userType:Multiuser|
	PlatformName    :	X5_2_LITE_IAAS
	PrevState       :	Invalid
	PrevUsrDevName  :
	SectorSize      :	512
	SerialNum       :	S2LHNAAH502855
	Size            :	3200631791616
	SlotNum         :	0
	SmartDiskWarnin :	0
	SmartTemperatur :	32
	State           :	Online
	StateChangeTs   :	1467176081
	StateDetails    :	Good
	TotalSectors    :	6251233968
	TypeName        :	0
	UsrDevName      :	NVD_S00_S2LHNAAH502855
	VendorName      :	Samsung
	gid             :	0
	mode            :	660
	uid             :	0

To display the SMART logs for an NVMe disk:

[root@dbsys ~]# dbadmcli show disk pd_00 -getlog 
SMART / Health Information : ---------------------------- Critical Warning : Available Spare below Threshold : FALSE Critical Warning : Temperature above Threshold : FALSE Critical Warning : Reliability Degraded : FALSE Critical Warning : Read-Only Mode : FALSE Critical Warning : Volatile Memory Backup Device Failure : FALSE Temperature : 32 degree Celsius Available Spare : 100% Available Spare Threshold : 10% Device Life Used : 0% Data Units Read (in 512k byte data unit) : 89493 Data Units Written (in 512k byte data unit) : 270387 Number of Host Read Commands : 4588381 Number of Host Write Commands : 6237344 Controller Busy Time : 3 minutes Number of Power Cycles : 227 Number of Power On Hours : 1115 Number of Unsafe Shutdowns : 218 Number of Media Errors : 0 Number of Error Info Log Entries : 0

dbadmcli show diskgroup

Use the dbadmcli show diskgroup command to list configured diskgroups or display a specific diskgroup configuration.

Syntax

To list configured diskgroups:

dbadmcli show diskgroup [-h]

To display DATA configurations:

dbadmcli show diskgroup [DATA] [-h]

To display RECO configurations:

dbadmcli show diskgroup [RECO] [-h]

Parameters

Parameter Description
DATA (Optional) Displays the DATA diskgroup configurations.
-h (Optional) Displays help for using the command.
RECO (Optional) Displays the RECO diskgroup configurations.

Examples

To list all diskgroups:

[root@dbsys ~]# dbadmcli show diskgroup

DiskGroups
----------
DATA
RECO

To display DATA configurations:

[root@dbsys ~]# dbadmcli show diskgroup DATA

ASM_DISK 	PATH 			        DISK 	STATE 	STATE_DETAILS
data_00 	/dev/NVD_S00_S2LHNAAH101026p1 	pd_00 	ONLINE 	Good
data_01 	/dev/NVD_S01_S2LHNAAH101008p1 	pd_01 	ONLINE 	Good

dbadmcli show env_hw

Use the dbadmcli show env_hw command to display the environment type and hardware version of the current DB system.

Syntax

dbadmcli show env_hw [-h]

Parameter

Parameter Description
-h (Optional) Displays help for using the command.

dbadmcli show fs

Use the dbadmcli show fs command to display file system details.

Syntax

dbadmcli show fs [-h]

Parameter

Parameter Description
-h (Optional) Displays help for using the command.

dbadmcli show storage

Use the dbadmcli show storage command to show the storage controllers, expanders, and disks.

Syntax

dbadmcli show storage [-h]

To show storage errors:

dbadmcli show storage -errors [-h]

Parameters

Parameter Description
-errors (Optional) Shows storage errors.
-h (Optional) Displays help for using the command.

Example

To display storage devices:

[root@dbsys ~]# dbadmcli show storage
==== BEGIN STORAGE DUMP ========
Host Description: Oracle Corporation:ORACLE SERVER X5-2
Total number of controllers: 5
        Id          = 4
        Pci Slot    = -1
        Serial Num  =
        Vendor      =
        Model       =
        FwVers      =
        strId       = iscsi_tcp:00:00.0
        Pci Address = 00:00.0

        Id          = 0
        Pci Slot    = 13
        Serial Num  = S2LHNAAH504431
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYA8R3Q
        strId       = nvme:25:00.00
        Pci Address = 25:00.0

        Id          = 1
        Pci Slot    = 12
        Serial Num  = S2LHNAAH505449
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYA8R3Q
        strId       = nvme:27:00.00
        Pci Address = 27:00.0

        Id          = 2
        Pci Slot    = 10
        Serial Num  = S2LHNAAH503573
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYA8R3Q
        strId       = nvme:29:00.00
        Pci Address = 29:00.0

        Id          = 3
        Pci Slot    = 11
        Serial Num  = S2LHNAAH503538
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYA8R3Q
        strId       = nvme:2b:00.00
        Pci Address = 2b:00.0

Total number of expanders: 0
Total number of PDs: 4
        /dev/nvme2n1    Samsung           NVD 3200gb slot:  0  pci : 29
        /dev/nvme3n1    Samsung           NVD 3200gb slot:  1  pci :  2
        /dev/nvme1n1    Samsung           NVD 3200gb slot:  2  pci : 27
        /dev/nvme0n1    Samsung           NVD 3200gb slot:  3  pci : 25
==== END STORAGE DUMP =========

dbadmcli stordiag

Use the dbadmcli stordiag command to collect detailed information for each disk or NVM Express (NVMe).

Syntax

dbadmcli stordiag <name> [-h]

Parameters

Parameter Description
name Defines the disk resource name. The resource name format is pd_[0..3].
-h (Optional) Displays help for using the command.

Example

To display detailed information for NVMe pd_00:

[root@dbsys ~]# dbadmcli stordiag pd_0