Oracle Cloud Infrastructure Documentation

Oracle Database CLI Reference

The database CLI (dbcli) is a command line interface available on bare metal and virtual machine 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.

Note

The database CLI is not for use on Exadata DB systems.

Operational Notes

  • The database CLI commands must be run as the root user.

  • dbcli is in the /opt/oracle/dcs/bin/ directory.

    This 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 /opt/oracle/dcs/log/ directory.

  • The database 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.

Warning

Oracle recommends that you avoid specifying parameter values that include confidential information when you use the database CLI commands.

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.

Note

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"
}

Agent Commands

The following commands are available to manage agents: 

dbcli ping-agent

Use the dbcli ping-agent command to test the reachability of an agent.

Syntax

dbcli ping-agent [-h] [-j]

Parameters

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

dbcli list-agentConfigParameters

Use the dbcli list-agentConfigParameters command to list agent configuration parameters.

Syntax

dbcli list-agentConfigParameters [-n] [-h] [-j]

Parameters

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

dbcli update-agentConfigParameters

Use the dbcli update-agentConfigParameters command to update agent configuration parameters.

Syntax

dbcli update-agentConfigParameters -n <parameter> [-v <value>] [-a] [-c] [-d] [-u] [-r] [-h] [-j]

Parameters

Parameter Full Name Description
-a --append (Optional) Appends the specified values to the specified parameters. Example with multiple parameter names and values: -n p1 -v v1 -n p2 -v v2 -a
-c --comment (Optional) Adds a comment for the parameter. Default: [ ]
-d --description (Optional) Adds a description for the parameter. Default: [ ]
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-n --name Parameter name. Example with multiple parameter names and values: -n p1 -v v1 -n p2 -v v2 Default: [ ]
-r --reset (Optional) Resets the parameter to the default value. Example resetting multiple parameters: -n p1 -n p2 -r Default: false
-u --update (Optional) Replaces the specified parameter values as directed. Example with multiple parameter names and values: -n p1 -v v1 -n p2 -v v2 -u Default: false
-v --value (Optional) Parameter value. Example with multiple parameter names and values: -n p1 -v v1 -n p2 -v v2 Default: [ ]

Autologcleanpolicy Commands

The following commands are available to manage policies for automatic cleaning (purging) of logs.

dbcli create-autoLogCleanPolicy

Use the dbcli create-autoLogCleanPolicy command to create policies for automatic cleaning (purging) of logs.

Syntax

dbcli create-autoLogCleanPolicy [-c {gi|database|dcs}] [-f <number>] [-o <number>] [-u {Day|Hour|Minute}] [-uMB <number>] [-uPer <number>] [-h] [-j]

Parameters

Parameter Full Name Description
-c --components (Optional) Components to purge. Possible values are gi, database, and dcs. Separate multiple values with commas. Example: gi,dcs
-f --freeSpaceBelowPercentage (Optional) Purges logs when the free disk space is below the specified percentage of the total partition size. Valid range: 20-50. Default: 20.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-o --olderthan (Optional) Quantity portion of time interval. Default: 30. Cleans logs older than the specified time interval (-o and -u).
-u --olderThanUnit (Optional) Unit portion of time interval. Possible values: Day, Hour, or Minute. Default: Day. Cleans logs older than the specified time interval (-o and -u).
-uMB --usageOverMB (Optional) Purges logs when log usage exceeds the specified number of MegaBytes (MB). Valid range: 10 to 50% of total partition size.
-uPer --usageOverPercentage (Optional) Purges logs when log usage exceeds the specified percentage of the total partition size. Valid range: 10-50.

dbcli list-autoLogCleanPolicy

Use the dbcli list-autoLogCleanPolicy command to list policies for automatic cleaning of logs.

Syntax

dbcli list-autoLogCleanPolicy [-c {gi|database|dcs}] [-h] [-j]

Parameters

Parameter Full Name Description
-c --components (Optional) Components. Possible values are gi, database, and dcs. Separate multiple values with commas. Example: gi,dcs
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

Backup Commands

The following commands are available to back up databases: 

Note

Instead of using dbcli, you can use the Console or the API to manage backing up your bare metal or virtual machine DB system databases to Object Storage. However, if you switch from using dbcli to using managed backups, a new backup configuration is created and associated with your database, and backups you created by using dbcli will not be accessible from the managed backup interfaces. For information about managed backups, see Backing Up a Database to Oracle Cloud Infrastructure Object Storage.

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 with the database by using the dbcli update-database command.

After a database is associated with a backup configuration, you can use the dbcli create-backup command in a cron job to run backups automatically. You can use a cron utility such as CronMaker to help build expressions. For more information, see http://www.cronmaker.com.

dbcli create-backup

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

Syntax

dbcli create-backup -in <db_name> -i <db_id> [-bt {Regular-L0|Regular-L1|Longterm|ArchiveLog}] [-c {Database|TdeWallet}] [-k <n>] [-t <tag>] [-h] [-j]

Parameters

Parameter Full Name Description
-bt --backupType

(Optional) Backup type. Possible values are Regular-L0, Regular-L1, Longterm, and ArchiveLog. Regular-L0 and Regular L1 correspond to incremental L0 and L1 backups. Longterm corresponds to Full backup. ArchiveLog corresponds to archived redo logs backup. The default value is Regular-L1. Values are not case-sensitive. If omitted, the default value is used.

-c --component

(Optional) Component. Possible values are Database and TdeWallet. The default value is Database. The value TdeWallet backs up TDE wallets. Values are not case-sensitive. If omitted, the default value is used.

Note

TDE wallets are automatically backed up in the following situations: 

  • A database is created with an Object Storage backup configuration.
  • A database that has an Object Storage backup configuration is updated.
  • An Object Storage backup configuration is updated.
  • A backup of the type Longterm is created.
  • The TDE key for a database is rotated.
  • A database is backed up and no TDE wallet backups exist yet.
-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.
-in --dbName The name of the database to back up. Use the dbcli list-databases command to get the database's name.
-j --json (Optional) Displays JSON output.
-k --keepDays

(Optional) Specifies the time until which the backup or copy must be kept. After this time the backup is obsolete, regardless of the backup retention policy settings. For Longterm backup type only.

-t --tag

(Required for Longterm backup type) Specifies a user-specified tag name for a backup set and applies this tag to the output files generated by the command. This value is not case sensitive. Valid number of characters: 1 to 30. The characters are limited to the characters that are valid in file names on the target file system. For example, ASM does not support the use of the hyphen (-) character in the file names it uses internally, so weekly-incremental is not a valid tag name for backups in ASM disk groups. Environment variables are not valid in the TAG parameter.

Examples

The following command creates a backup of the specified database using the database ID.

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

The following command creates a backup of the specified database using the database name ("mydb").

[root@dbsys ~]# dbcli create-backup -in mydb

dbcli getstatus-backup

Use the dbcli getstatus-backup command to display the status of a backup.

Syntax

dbcli getstatus-backup -t <backup_type> [i <id>] [-in <name>] [-l] [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --dbId (Optional) Database Resource ID.
-in --dbName (Optional) Database Resource Name.
-j --json (Optional) Displays JSON output.
-l --isLatestBackupReport (Optional) Latest backup report. Default: true.
-t --backupType Backup type.

dbcli schedule-backup

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

Syntax

dbcli schedule-backup -t <backup_type> -f <number> [i <id>] [-in <name>] [-h] [-j]

Parameters

Parameter Full Name Description
-f --frequency Frequency in minutes.
-h --help (Optional) Displays help for using the command.
-i --dbId (Optional) Database Resource ID.
-in --dbName (Optional) Database Resource Name.
-j --json (Optional) Displays JSON output.
-t --backupType Backup type.

Backupconfig Commands

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

Warning

Backups that were configured using the Console may become unusable if you make changes using these commands. For backups configured using the Console, use these commands with support guidance only.

Note

Instead of using dbcli, you can use the Console or the API to manage backing up your bare metal or virtual machine DB system databases to Object Storage. For information about managed backups, see Backing Up a Database to Oracle Cloud Infrastructure Object Storage.

After a database is associated with a backup configuration, you can use the dbcli create-backup command in a cron job to run backups automatically. You can use a cron utility such as CronMaker to help build expressions. For more information, see http://www.cronmaker.com.

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> -on <object_store_swift_name> -w <n> -n <name> [-cr|-no-cr] [-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.

-cr

-no-cr

--crosscheck

--no-crosscheck

(Optional) Indicates whether to enable the crosscheck operation. This operation determines if the files on the disk or in the media management catalog correspond to data in the RMAN repository. If omitted, the default setting is used (crosscheck is enabled by default).

-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.

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.

-on --objectstoreswiftName

The name 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 name. 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> -in <name> [-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.
-in --backupconfigname The backup configuration name. Use the dbcli list-backupconfigs command to get the name.
-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> -in <name> -w <n> -c <bucket> -o <object_store_swift_id> -on <object_store_swift_name> [-cr|-no-cr] [-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.

-cr

-no-cr

--crosscheck

--no-crosscheck

(Optional) Indicates whether to enable the crosscheck operation. This operation determines if the files on the disk on in the media management catalog correspond to data in the RMAN repository. If omitted, the default setting is used (crosscheck is enabled by default).

-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.
-in --backupconfigname The name of the backup configuration to update. Use the dbcli list-backupconfigs command to get the name.
-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.

-on --objectstoreswiftname

The name 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 name. 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> -in <name> [-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.
-in --backupconfigname The name of the backup configuration to delete. Use the dbcli list-backupconfigs command to get the name.
-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

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.

Note

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|-hp <passphrase> [-n <credentials_name>] [-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_name>.oraclecloud.com

See Regions and Availability Domains for region name strings.

-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. See Where to Find Your Tenancy's OCID. The tenancy OCID looks something like this:

ocid1.tenancy.oc1..<unique_ID>
-u --userOcid

The user name OCID for your Oracle Cloud Infrastructure user account. You can find the OCID in the Console: Open the User menu (User menu icon) and click User Settings. The user name OCID looks something like this:

ocid1.user.oc1..<unique_ID>

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> -n <credentials_name> -c [backup|patching|other] -p|-hp <passphrase> -f <fingerprint> -k <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.
-n --name (Optional) The name for the credentials configuration. Use the dbcli list-bmccredentials command to get the name.

-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

Tip

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.

Note

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                                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.161018      up-to-date  
ORADB12102_HOME2, ORADB12102_HOME3       12.1.0.2.160719      12.1.0.2.161018  

Database Commands

The following commands are available to manage databases:

dbcli clone-database

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

Syntax

dbcli clone-database -f <name> -u <name> -n <name> [-s <shape>] [-t <type>] [m <sys_password>] [-p <tde_password>] [-h] [-j]

Parameters

Parameter Full Name Description
-f --sourcedbname Source database name.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-m --syspassword (Optional) Password for SYS.
-n --dbname Database name.
-p --tdepassword (Optional) Password for source TDE wallet.
-s --dbshape (Optional) Database shape. Examples: odb1, odb2.
-t --dbtype (Optional) Database Type: SI
-u --databaseUniqueName Database unique name.

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, however each database home can have only one database.

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.

Tip

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.

Note

The dbcli create-database command is available on bare metal DB systems only.

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> -bn <bkup_config_name> -m -s <db_shape> -r {ACFS|ASM} -y {SI|RAC|RACOne} [-dn <name>] -io -d <pdb_admin_user> [-p <pdb>] [-ns <nlcharset>] [-cs <charset>] [-l <language>] [-dt <territory>] -v <version> [-c|-no-c] [-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.
-bn --backupconfigname Defines the backup configuration name for future use. Use the dbcli list-backupconfigs command to get the name.

-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.
-dn --dbdomainname

(Optional) Database domain name (indicates the logical location of the database within the network structure).

-dt --dbterritory (Optional) Defines the territory for the database. The default is AMERICA.
-dh

--dbhomeid

 

Identifies the database home in which to create the database. The database home must be empty because each database home can have only one database. You can 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.
-j --json (Optional) Displays JSON output.
-l --dblanguage (Optional) Defines the language for the database. The default is AMERICAN.

-m

--adminpassword

A strong password for SYS, SYSTEM, TDE wallet, and PDB Admin. The password must be 9 to 30 characters and contain at least 2 uppercase, 2 lowercase, 2 numeric, and 2 special characters. The special characters must be _, #, or -. The password must not contain the username (SYS, SYSTEM, and so on) or the word "oracle" either in forward or reversed order and regardless of casing.

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

-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 --nationalscharacterset (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 ASM.

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.

    Note

    Bare metal DB systems allow only one database per database home.

  • When --dbhomeid is provided, the dbcli create-database command creates the database using the Oracle home specified. Use the dbcli list-dbhomes command to get the dbhomeid. The database home you specify must be empty.
  • 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 a 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 a database non-interactively, providing the password on the command line:

[root@dbsys ~]# dbcli create-database -n crmdb -hm <password> -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.

Note

The dbcli create-database command is available on bare metal DB systems only.

Syntax

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

Parameters

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

(Optional) Forces the delete operation.

-i --dbid The ID of the database to delete. Use the dbcli list-databases command to get the database ID.
-in --dbName The name of the database to delete. Use the dbcli list-databases command to get the database name.
-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> -in <db_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 display. Use the dbcli list-databases command to get the database ID.
-in --dbName The name of the database to display. Use the dbcli list-databases command to get the database name.
-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 modify-database

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

Syntax

dbcli modify-database -i <db_id> -dh <destination_db_home_id> [-h] [-j]

Parameters

Parameter Full Name Description
-dh --destdbhomeid Destination database home ID.
-h --help (Optional) Displays help for using the command.
-i --databaseid Database ID.
-j --json (Optional) Displays JSON output.

dbcli recover-database

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

Syntax

dbcli recover-database [-br <json>] [-in <db_name>] [-i <db_id>] [-r <time>] [-t {Latest|PITR|SCN}] [-s] [-l <location>] [-tp <tde_password>] [-h] [-j]

Parameters

Parameter Full Name Description
-br --backupReport (Optional) JSON input for backup report.
-h --help (Optional) Displays help for using the command.
-i --dbid (Optional) Database resource ID.
-in --dbName (Optional) Database name.
-j --json (Optional) Displays JSON output.
-l --tdeWalletLocation (Optional) TDE wallet backup location. TDE wallet should be backed up in tar.gz format.
-r --recoveryTimeStamp (Required when recovery type is PITR) Recovery timestamp in the format mm/dd/yyyy hh:mi:ss. Default: [ ]
-s --scn (Required when recovery type is SCN) SCN.
-t --recoverytype (Required when backup report is provided) Recovery type. Possible values are Latest, PITR, and SCN.
-tp --tdeWalletPassword (Optional) TDE wallet password.

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.

Note

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>] [-tp <password>] -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.
-tp --tdeWalletPassword

(Optional) Password for TDE wallet. Required if TDE is enabled on the migrated database.

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> -bin <bkup_config_name> [-id <id>] -in <name> [-no-ab] [-h] [-j]

Parameters

Parameter Full Name Description
-bi --backupconfigid Defines the backup configuration ID. Use the dbcli list-backupconfigs command to get the ID.
-bin --backupconfigname Defines the backup configuration name for future use. Use the dbcli list-backupconfigs command to get the name.
-id --databaseid

(Optional.) Specifies the DBID, which is a unique 32-bit identification number computed when the database is created. RMAN displays the DBID upon connection to the target database. You can obtain the DBID by querying the V$DATABASE view or the RC_DATABASE and RC_DATABASE_INCARNATION recovery catalog views.

-in --dbName

Defines the database name to be updated. Use the dbcli list-databases command to get the database name.

-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.
-no-ab --noautobackup

(Optional) Disables automatic backups for the specified database.

Note

Once disabled, automatic backup cannot be re-enabled using the CLI. To re-enable automatic backup, use the Console.

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

Tip

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> -n <node> [--local] [--precheck] [-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.
-n --node

(Optional) Node number to be updated. Use the dbcli list-nodes command to get the node number.

  --local

(Optional) Performs the operation on the local node of a multi-node high availability (HA) system. This parameter is not needed to perform the operation on a single-node system.

  --precheck

(Optional) Runs precheck operations to check prerequisites.

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 value is ASM.
-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
}

Dgconfig Commands

dbcli list-dgconfigs

Use the dbcli list-dgconfigs command to list DG configurations.

Syntax

dbcli list-dgconfigs [-h] [-j]

Parameters

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

Featuretracking Commands

dbcli list-featuretracking

Use the dbcli list-featuretracking command to list tracked features.

Syntax

dbcli list-featuretracking[-h] [-j]

Parameters

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

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

Tip

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.

Note

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        

Logcleanjob Commands

The following commands are available to manage log cleaning jobs: 

dbcli create-logCleanJob

Use the dbcli create-logCleanJob command to create a log cleaning job.

Syntax

dbcli create-logCleanJob [-c {gi|database|dcs}] [-o <number>] [u {Day|Hour|Minute}] [-h] [-j]

Parameters

Parameter Full Name Description
-c --components (Optional) Components. Possible values are gi, database, and dcs. Separate multiple values by commas.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.
-o --olderThan (Optional) Quantity portion of time interval. Default: 30. Cleans logs older than the specified time interval (-o and -u).
-u --unit (Optional) Unit portion of time interval. Possible values: Day, Hour, or Minute. Default: Day. Cleans logs older than the specified time interval (-o and -u).

dbcli describe-logCleanJob

Use the dbcli describe-logCleanJob command to display the summary for a log cleaning job.

Syntax

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

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --jobid ID of log cleaning job for which to display the summary.
-j --json (Optional) Displays JSON output.

dbcli list-logCleanJobs

Use the dbcli list-logCleanJobs command to list log cleaning jobs.

Syntax

dbcli list-logCleanJobs [-h] [-j]

Parameters

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

Logspaceusage Command

dbcli list-logSpaceUsage

Use the dbcli list-logSpaceUsage command to list log space usage.

Syntax

dbcli list-logSpaceUsage [-c {gi|database|dcs}] [-h] [-j] 

Parameters

Parameter Full Name Description
-c --components (Optional) Components. Possible values: gi, database, and dcs. Separate multiple values by commas.
-h --help (Optional) Displays help for using the command.
-j --json (Optional) Displays JSON output.

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

Node Command

dbcli list-nodes

Use the dbcli list-nodes command to display a list of nodes, including the node numbers.

Syntax

dbcli list-nodes [-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 nodes:

[root@dbsys ~]# dbcli list-nodes
node Number node Name 				     ilom Name 	          IP Address 	     Subnet 		Mask Gateway
---------- ---------------------------------------- -------------------- ------------------ ------------------ ------------------
0 	    rac21 				     N/A 		  N/A 		     N/A		N/A
1 	    rac22 				     N/A 		  N/A 		     N/A 		N/A

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 with the database by using the dbcli update-database command.

The following commands are available to manage object stores.

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_name>.oraclecloud.com/v1 -p [-h] [-j]

Parameters

Parameter Full Name Description
-e --endpointurl

The following endpoint URL.

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

See Regions and Availability Domains for region name strings.

-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@example.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@example.com -e https://swiftobjectstorage.<region_name>.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> -in <object_store_swift_name> [-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.
-in --objectstoreswiftName The object store name. Use the dbcli list-objectstoreswifts command to get the name.
-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@example.com
             TenantName: CompanyABC
           endpoint URL: https://swiftobjectstorage.<region_name>.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@example.com    LargeComputers https://swiftobjectstorage.<region_name>.oraclecloud.com/v1 November 10, 2016 8:42:18 PM UTC
910e9e2d-25b4-49b4-b88e-ff0332f7df87     objstrswift15        djones@example.com    LargeComputers https://swiftobjectstorage.<region_name>.oraclecloud.com/v1 November 16, 2016 11:25:34 PM UTC

Pendingjob Command

dbcli list-pendingjobs

Use the dbcli list-pendingjobs command to display a list of pending jobs.

Syntax

dbcli list-pendingjobs [-h] [-j] 

Parameters

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

Rmanbackupreport Commands

The following commands are available to manage RMAN backup reports: 

dbcli create-rmanbackupreport

Use the dbcli create-rmanbackupreport command to create an RMAN backup report.

Syntax

dbcli create-rmanbackupreport -w {summary|detailed} -rn <name> [-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) Database resource ID.
-in --dbname (Optional) Database resource name.
-j --json (Optional) Displays JSON output.
-rn --rptname RMAN backup report name. Maximum number of characters: 30. Wrap name in single quotes when special characters are used.
-w --reporttype RMAN backup report type. Possible values: summary or detailed.

dbcli delete-rmanbackupreport

Use the dbcli delete-rmanbackupreport command to delete an RMAN backup report.

Syntax

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

Parameters

Parameter Full Name Description
-d --dbid (Optional) Database resource ID.
-dn --dbname (Optional) Database resource name.
-h --help (Optional) Displays help for using the command.
-i --reportid (Optional) RMAN backup report ID
-in --rptname (Optional) RMAN backup report name
-j --json (Optional) Displays JSON output.
-n --numofday (Optional) Number of days since created (provided with Database ID/Database Name)

dbcli describe-rmanbackupreport

Use the dbcli describe-rmanbackupreport command to

Syntax

dbcli describe-rmanbackupreport [-i <rpt_id>] [-in <rpt_name>] [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-i --id (Optional) RMAN backup report ID
-in --name (Optional) RMAN backup report name
-j --json (Optional) Displays JSON output.

dbcli list-rmanbackupreports

Use the dbcli list-rmanbackupreports command to

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) Database resource ID.
-in --dbName (Optional) Database resource name.
-j --json (Optional) Displays JSON output.

Schedule Commands

The following commands are available to manage schedules: 

dbcli describe-schedule

Use the dbcli describe-schedule command to describe a schedule.

Syntax

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

Parameters

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

dbcli list-schedules

Use the dbcli list-schedules command to list 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.

dbcli update-schedule

Use the dbcli update-schedule command to update a schedule.

Syntax

dbcli update-schedule -i <id> [-x <expression>] [-t <description>] [-d] [-e] [-h] [-j]

Parameters

Parameter Full Name Description
-d --disable (Optional) Disables the schedule.
-e --enable (Optional) Enables the schedule.
-h --help (Optional) Displays help for using the command.
-i --scheduleid Schedule ID.
-j --json (Optional) Displays JSON output.
-t --description (Optional) Description
-x --cronExpression (Optional) Cron expression. Use cronmaker.com to generate a valid cron expression.

Scheduledexecution Command

dbcli list-scheduledExecutions

Use the dbcli list-scheduledExecutions command to list scheduled executions.

Syntax

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

Parameters

Parameter Full Name Description
-e --executionid (Optional) Execution ID.
-h --help (Optional) Displays help for using the command.
-i --scheduleid (Optional) Schedule ID.
-j --json (Optional) Displays JSON output.

Server Command

dbcli update-server

Tip

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.

Syntax

dbcli update-server [-n <number>] [--local] [--precheck] [-h] [-j]

Parameters

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

(Optional) Performs the operation on the local node of a multi-node high availability (HA) system. This parameter is not needed to perform the operation on a single-node system.

-n --node

(Optional) Node number to be updated. Use the dbcli list-nodes command to get the node number.

-p --precheck

(Optional) Runs precheck operations to check prerequisites.

Examples

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    

The following command updates node 0 of the server only, with precheck: 

# dbcli update-server -n 0 -p
{
  "jobId" : "3e2a1e3c-83d3-4101-86b8-4d525f3f8c18",
  "status" : "Created",
  "message" : null,
  "reports" : [ ],
  "createTimestamp" : "April 26, 2019 06:07:27 AM UTC",
  "resourceList" : [ ],
  "description" : "Server Patching Prechecks",
  "updatedTime" : "April 26, 2019 06:07:27 AM UTC"
}

System Command

dbcli describe-system

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

Syntax

dbcli describe-system [-b] [-d] [-h] [-j]

Parameters

Parameter Full Name Description
-b --bom (Optional) Displays BOM information.

-d

--details

(Optional) 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.

TDE Commands

The following commands are available to manage TDE-related items (backup reports, keys, and wallets): 

dbcli list-tdebackupreports

Use the dbcli list-tdebackupreports command to list backup reports for TDE wallets.

Syntax

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

Parameters

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

Example

The following command lists the backup reports for TDE wallets:

[root@dbsys ~]# dbcli list-tdebackupreports
DbResID OraDbId BackupLocation --------------------------------------- -------------------- ---------------------------------------- 538ca5b1-654d-4418-8ce1-f49b6c987a60 1257156075 https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/dbaasimage/backuptest/host724007/tdewallet/Testdb5/1257156075/2017-08-17/TDEWALLET_BMC60_2017-08-17_10-58-17.0990.tar.gz 538ca5b1-9fb2-4245-b157-6e25d7c988c5 704287483 https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/dbaasimage/backuptest/host724007/tdewallet/Testdb1/704287483/2017-08-17/TDEWALLET_AUTO_2017-08-17_11-03-25.0953.tar.gz 538ca5b1-9fb2-4245-b157-6e25d7c988c5 704287483 https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/dbaasimage/backuptest/host724007/tdewallet/Testdb1/704287483/2017-08-17/TDEWALLET_BMC62_2017-08-17_11-04-41.0264.tar.gz 19714ffa-de1b-4433-9188-c0592887e609 1157116855 https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/dbaasimage/backuptest/host724007/tdewallet/Testdb7/1157116855/2017-08-17/TDEWALLET_AUTO_2017-08-17_11-57-47.0605.tar.gz

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 [-all] -n <pdbname1,pdbname2> [-r|-no-r] -t <tag_name> [-h] [-j]

Parameters

Parameter Full Name Description
-all --allPdbNames

(Optional) Flag to rotate (update) all PDB names. To update all instead of specified PDB names, use this parameter instead of -n. Default: false.

-i --databaseId

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 (updated).

-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
}

dbcli recover-tdewallet

Use the dbcli recover-tdewallet command to recover a TDE wallet.

Syntax

dbcli recover-tdewallet -in <db_name> -tp <password> [-l <location>] [-h] [-j]

Parameters

Parameter Full Name Description
-h --help (Optional) Displays help for using the command.
-in --dbName Database name.
-j --json (Optional) Displays JSON output.
-l --tdeWalletBackuplocation (Optional) TDE wallet backup location. TDE wallet should b ebacked up in tar.gz format.
-tp --tdeWalletPassword

Defines the TDE Admin wallet password.

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 [-h]

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.

Note

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> [-h]

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] [-h]

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