Deleting an RDS for Oracle tenant database from your CDB - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Deleting an RDS for Oracle tenant database from your CDB

You can delete a tenant database (PDB) using the Amazon Web Services Management Console, the Amazon CLI, or the RDS API. Consider the following prerequisites and limitations:

  • The tenant database and DB instance must exist.

  • For the deletion to succeed, one of the following situations must exist:

    • The tenant database and DB instance are available.

      Note

      You can take a final snapshot, but only if the tenant database and DB instance were in an available state before you issued the delete-tenant-database command.

    • The tenant database is being created.

    • The DB instance is modifying the tenant database.

  • You can't delete multiple tenant databases in a single operation.

  • You can't delete a tenant database if it is the only tenant in the CDB.

To delete a tenant database
  1. Sign in to the Amazon Web Services Management Console and open the Amazon RDS console at https://console.amazonaws.cn/rds/.

  2. In the navigation pane, choose Databases, and then choose the tenant database that you want to delete.

  3. For Actions, choose Delete.

  4. To create a final DB snapshot for the DB instance, choose Create final snapshot?.

  5. If you chose to create a final snapshot, enter the Final snapshot name.

  6. Enter delete me in the box.

  7. Choose Delete.

To delete a tenant database using the Amazon CLI, call the delete-tenant-database command with the following parameters:

  • --db-instance-identifier value

  • --tenant-db-name value

  • [--skip-final-snapshot | --no-skip-final-snapshot]

  • [--final-snapshot-identifier value]

This following example deletes the tenant database named pdb-test from the CDB named my-cdb-inst. By default, the operation creates a final snapshot.

Example

For Linux, macOS, or Unix:

aws rds delete-tenant-database --region us-east-1 \ --db-instance-identifier my-cdb-inst \ --tenant-db-name pdb-test \ --final-snapshot-identifier final-snap-pdb-test

For Windows:

aws rds delete-tenant-database --region us-east-1 ^ --db-instance-identifier my-cdb-inst ^ --tenant-db-name pdb-test ^ --final-snapshot-identifier final-snap-pdb-test

This command produces output similar to the following.

{ "TenantDatabase" : { "DbiResourceId" : "db-abc123", "TenantDatabaseResourceId" : "tdb-bac456", "TenantDatabaseArn" : "arn:aws:rds:us-east-1:123456789012:db:my-cdb-inst:pdb-test", "DBInstanceIdentifier" : "my-cdb-inst", "TenantDBName" : "pdb-test", "Status" : "deleting", "MasterUsername" : "pdb-test-admin" "Port" : "6555", "CharacterSetName" : "UTF-16", "MaxAllocatedStorage" : "1000", "ParameterGroups": [ { "ParameterGroupName": "tenant-1-params", "ParameterApplyStatus": "in-sync" } ], "OptionGroupMemberships": [ { "OptionGroupName": "tenant-1-options", "Status": "in-sync" } ] } }