Oracle Database CLI Reference
The Database CLI (dbcli) is a command line interface available for Base Database Service. After you connect to the DB system in the Base Database Service, you can use the dbcli to perform tasks such as creating Oracle database homes and databases.
               
Operational Notes
- 
                        
                        The database CLI commands must be run as the root user. 
- 
                        
                        dbcliis 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 dbclicommand output in thedcscli.loganddcs-agent.logfiles 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.
Syntax
The database CLI commands use the following syntax:
dbcli command [parameters]where:
- commandis a verb-object combination such as- create-database.
- parametersinclude 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:
On RAC DB systems, execute the cliadm update-dbcli command on each node in the cluster.
                        
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:
                     
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 command is available to manage agents:
- dbcli ping-agent
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. | 
Autologcleanpolicy Commands
The following commands are available to manage policies for automatic cleaning (purging) of logs.
- dbcli create-autoLogCleanPolicy
- dbcli list-autoLogCleanPolicy
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 ( -oand-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 ( -oand-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:
- dbcli create-backup
- dbcli getstatus-backup
- dbcli schedule-backup
Note:
Instead of using dbcli, you can use the Console or the API to manage backing up the databases your DB system to the 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 Back Up and Recovery in Base Database Service.
                     
Before you can back up a database by using the dbcli create-backup
            command, you'll need to:
                  
- Create a backup configuration by using the dbcli create-backupconfigcommand.
- Associate the backup configuration with the database by using the dbcli update-databasecommand.
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 CronMaker.
                  
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 that the TDE wallets are automatically backed up in the following situations: 
                                        
 | 
| -h | --help | (Optional) Displays help for using the command. | 
| -i | --dbid | The  ID of the database to back up. Use the dbcli list-databasescommand to get the database's ID. | 
| -in | --dbName | The name of the database to back up. Use the dbcli list-databasescommand 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.
dbcli create-backup -i 573cadb2-0cc2-4c1c-9c31-595ab8963d5bThe following command creates a backup of the specified database using the database name ("mydb").
dbcli create-backup -in mydbdbcli 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. 
                  
Note:
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 the databases in your DB system to the Object Storage. For information about managed backups, see Back Up and Recovery in Base Database Service.
                     
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 CronMaker.
                  
The following commands are available to manage backup configurations:
- dbcli create-backupconfig
- dbcli list-backupconfigs
- dbcli describe-backupconfig
- dbcli update-backupconfig
- dbcli delete-backupconfig
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   | 
| -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  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  You must also specify   | 
| -on | --objectstoreswiftName | The name of the object store that contains the endpoint and credentials for the Oracle Cloud Infrastructure Object Storage service. Use the  You must also specify  | 
| -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':
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:
dbcli list-backupconfigsID                                       Name                 RecoveryWindow     BackupDestination CreateTime
---------------------------------------- -------------------- ------------------ ----------------- -----------------------------
ccdd56fe-a40b-4e82-b38d-5f76c265282d     dbbkcfg1             7                  Disk              July 10, 2016 12:24:08 PM UTCdbcli 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-backupconfigscommand to get the ID. | 
| -in | --backupconfigname | The backup configuration name. Use the dbcli list-backupconfigscommand to get the name. | 
| -j | --json | (Optional) Displays JSON output. | 
Example
The following command displays details about a backup configuration:
dbcli describe-backupconfig -i ccdd56fe-a40b-4e82-b38d-5f76c265282dBackup 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 UTCdbcli update-backupconfig
Use the dbcli update-backupconfig command to update an existing backup configuration.
                     
Syntax
dbcli update-backupconfig 
  -i <id> 
  -in <name> 
  -w <n> 
  -d {DISK|OBJECTSTORE|NONE} 
  -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   | 
| -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-backupconfigscommand to get the ID. | 
| -in | --backupconfigname | The name of the backup configuration to update.  Use the dbcli list-backupconfigscommand 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  You must also specify   | 
| -on | --objectstoreswiftname | The name of the object store that contains the endpoint and credentials for the Oracle Cloud Infrastructure Object Storage service. Use the  You must also specify   | 
| -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:
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-backupconfigscommand to get the ID. | 
| -in | --backupconfigname | The name of the backup configuration to delete.  Use the dbcli list-backupconfigscommand to get the name. | 
| -j | --json | (Optional) Displays JSON output. | 
Example
The following command deletes the specified backup configuration:
dbcli delete-backupconfig -i ccdd56fe-a40b-4e82-b38d-5f76c265282dComponent Command
dbcli describe-component
Your DB system might not include this newer command. If you have trouble running the command, use the CLI Update Command 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. 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 Update 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:
dbcli describe-componentSystem 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
- dbcli describe-database
- dbcli list-databases
- dbcli modify-database
- dbcli recover-database
- dbcli update-database
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 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-databasescommand to get the database ID. | 
| -in | --dbName | The name of the database to display. Use the dbcli list-databasescommand 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:
dbcli describe-dbhome -i b727bf80-c99e-4846-ac1f-28a81a725df6DB 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 AMdbcli 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:
dbcli  list-databasesID                                       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       ConfiguredThe following command displays the JSON output for a database:
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 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-backupconfigscommand to get the ID. | 
| -bin | --backupconfigname | Defines the backup configuration name for future use. Use the dbcli list-backupconfigscommand 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  | 
| -h | --help | (Optional) Displays help for using the command. | 
| -i | --dbid | Defines the database ID to be updated. Use the dbcli list-databasescommand to get the database ID. | 
| -j | --json | (Optional) Displays JSON output. | 
| -no-ab | --noautobackup | (Optional) Disables automatic backups for the specified database. Note that, 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:
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
- dbcli describe-dbhome
- dbcli delete-dbhome
- dbcli list-dbhomes
- dbcli update-dbhome
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. | 
Example
The following command creates an Oracle Database Home version 12.1.0.2:
dbcli create-dbhome -v 12.1.0.2dbcli 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-dbhomescommand 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.
dbcli describe-dbhome -i 52850389-228d-4397-bbe6-102fda65922bDB 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 UTCdbcli 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-dbhomescommand 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.
dbcli  list-dbhomesID                                   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
Note:
Your DB system might not include this newer command. If you have trouble running the command, use theCLI Update 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 Update 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-dbhomescommand to get the ID. | 
| -j | --json | (Optional) Displays JSON output. | 
| -n | --node |  
(Optional) Node number to be updated. Use the  | 
| -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. | 
| -p | --precheck | (Optional) Runs precheck operations to check prerequisites. | 
Example
The following commands update the database home and show the output from the update job:
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-bbd123469beaJob 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
- dbcli describe-dbstorage
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:
dbcli list-dbstoragesID                                       Type   DBUnique Name        Status
---------------------------------------- ------ -------------------- ----------
afb4a1ce-d54d-4993-a149-0f28c9fb33a4     Acfs   db1_2e56b3a9b815     Configured
d81e8013-4551-4d10-880b-d1a796bca1bc     Acfs   db11xp               Configureddbcli 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-dbstoragescommand 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:
dbcli describe-dbstorage -i 105a2db2-625a-45ba-8bdd-ee46da0fd83aDBStorage 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 UTCDgconfig 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. | 
Job Commands
The following commands are available to manage jobs:
- dbcli describe-job
- dbcli list-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-jobscommand to get the jobid. | 
| -j | --json | (Optional) Displays JSON output. | 
Example
The following command displays details about the specified job ID:
dbcli describe-job -i 74731897-fb6b-4379-9a37-246912025c17Job 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    Successdbcli 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:
dbcli list-jobsID                                       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    SuccessLatestpatch Command
dbcli describe-latestpatch
Note:
- Your DB system might not include this newer command. If you have trouble running the command, use the CLI Updatecommand to update the database CLI and then retry the command.
- The dbcli describe-latestpatchcommand 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. 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 Update 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:
dbcli describe-latestpatchcomponentType   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
- dbcli describe-logCleanJob
- dbcli list-logCleanJobs
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 ( -oand-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 ( -oand-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. | 
Netsecurity Commands
The following commands are available to manage network encryption on the DB system:
- dbcli describe-netsecurity
- dbcli update-netsecurity
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-dbhomescommand 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:
dbcli describe-netsecurity -H 16c96a9c-f579-4a4c-a645-8d4d22d6889dNetSecurity 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: Requireddbcli 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. ( | 
| -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-dbhomescommand 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. ( --clientand--serverare 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. | 
Example
The following command updates the connection type to ACCEPTED:
dbcli update-netsecurity -H a2ffbb07-c9c0-4467-a458-bce4d3b76cd5 -t ACCEPTEDObjectstoreswift 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:
                  
- Create an object store on the DB system, which contains the endpoint and credentials to access Object Storage, by using the dbcli create-objectstoreswiftcommand.
- Create a backup configuration that refers to the object store ID and the bucket name by using the dbcli create-backupconfigcommand.
- Associate the backup configuration with the database by using the dbcli update-databasecommand.
The following commands are available to manage object stores.
- dbcli create-objectstoreswift
- dbcli describe-objectstoreswift
- dbcli list-objectstoreswifts
dbcli create-objectstoreswift
Use the dbcli create-objectstoreswift command to create an object store.
                     
Syntax
dbcli create-objectstoreswift 
  -n <object_store_name> 
  -t <object_storage_namespace> 
  -u <user_name> 
  -e https://swiftobjectstorage.<region_name>.oraclecloud.com/v1 
  -p <password>
  [-h] [-j]where <object_storage_namespace> is your tenancy's Object Storage namespace.
Parameters
| Parameter | Full Name | Description | 
|---|---|---|
| -e | --endpointurl |  The following endpoint URL.  | 
| -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  Specify   | 
| -t | --tenantname | The Object Storage namespace of your tenancy. | 
| -u | --username | The user name for the Oracle Cloud Infrastructure user account, for example: -u djones@example.comThis 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:
dbcli create-objectstoreswift -n r2swift -t MyObjectStorageNamespace -u djones@example.com -e https://swiftobjectstorage.<region_name>.oraclecloud.com/v1 -pPassword 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-objectstoreswiftscommand to get the  ID. | 
| -in | --objectstoreswiftName | The object store name. Use the dbcli list-objectstoreswiftscommand to get the name. | 
| -j | --json | (Optional) Displays JSON output. | 
Example
The following command displays details about an object store:
dbcli describe-objectstoreswift -i 910e9e2d-25b4-49b4-b88e-ff0332f7df87Object 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 UTCdbcli 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:
dbcli list-objectstoreswiftsID                                       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 UTCPendingjob 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
- dbcli delete-rmanbackupreport
- dbcli describe-rmanbackupreport
- dbcli list-rmanbackupreports
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
- dbcli list-schedules
- dbcli update-schedule
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
Note:
Your DB system might not include this newer command. If you have trouble running the command, use theCLI Update 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 Update a DB System.
                     
Syntax
dbcli update-server 
  [-n <number>] 
  [--local] 
  [--precheck] 
  [-v]
  [-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  | 
| -p | --precheck | (Optional) Runs precheck operations to check prerequisites. | 
| -v | --version | (Optional) Version to be updated. | 
Examples
The following commands update the server and show the output from the update job:
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-9b820ddf6ed8Job 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
- dbcli update-tdekey
- dbcli recover-tdewallet
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-databasescommand 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-databasescommand to get the database resource name. | 
| -j | --json | (Optional) Displays JSON output. | 
Example
The following command lists the backup reports for TDE wallets:
dbcli list-tdebackupreportsDbResID 			            	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.gzdbcli 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  | 
| -i | --databaseId | Defines the database ID for which to update the key. | 
| -p | --password | Defines the
       TDE Admin wallet password. Specify  If you must provide the password in the command, for example in a script, use  | 
| -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:
dbcli update-tdekey -dbid ee3eaab6-a45b-4e61-a218-c4ba665503d9 -p -n pdb1,pdb2TDE 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:
dbcli update-tdekey -dbid ee3eaab6-a45b-4e61-a218-c4ba665503d9 -p -n pdb1,pdb2 -rTDE 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. |