This page describes how to delete a DB system in Google Cloud.

Deleting a DB system also deletes its container database and pluggable databases.
You can't undo this later.

## Before you begin

Make sure that you have the required Identity and Access Management (IAM) roles and
permissions to delete a DB system:

- `roles/oracledatabase.dbSystemAdmin`

For information on how to assign roles, see
[Apply IAM roles](https://docs.cloud.google.com/oracle/database/docs/iam-roles.md.txt).

## Delete a DB system and its databases

To delete your DB system and its databases, do the following:

### Console

1. Go to the **Base Database Service** page.

   [Go to Base Database Service](https://console.cloud.google.com/oracle/basedb/)
2. For the DB system which you want to delete,
   click **View actions** ,
   and then click **Delete**.

3. In the **Delete DB system?** dialog, type the DB system
   name to confirm deletion of your DB system.

4. Click **Confirm**.

### API

To delete a DB system, run the following `curl` command:

```
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/dbSystems/DB_SYSTEM_ID"
```

Replace the following:

- <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project which contains the DB system to be deleted. If you're using a Shared VPC, then this is the ID of your host project.
- <var translate="no">REGION</var>: the region of your DB system.
- <var translate="no">DB_SYSTEM_ID</var>: the ID of your DB system.