About Pluggable Databases

This article provides details about pluggable databases and managing their various features, such as backup, restore, relocate, and clone.

The multitenant architecture enables an Oracle Database to be a container database. A container database (CDB) contains one or more user-created, pluggable databases and application containers. A pluggable database (PDB) is a portable collection of schemas, schema objects, and nonschema objects that appears to an application as a separate database. At the physical level, each pluggable database has its own set of data files that store the data for the pluggable database. The container database includes all the data files for the pluggable databases contained within it and a set of system data files that store metadata for the container database itself.

Oracle 19c or later databases created in a DB system include an initial pluggable database that you can access from the database details page in the OCI Console. Using the OCI Console or APIs, you can start, stop, clone, and delete pluggable databases. You can also create additional pluggable databases in the container database. All pluggable database operations performed using the OCI Console or APIs can be monitored using the work request generated by the operation. For more information, see Work Requests.

You can create and manage pluggable databases in the DB system using the OCI Console and APIs.

Note: Generally, the term ‘database’ refers to the container database (CDB).

Create

You can have more than one pluggable database in a pluggable database. Pluggable databases must be created one at a time, and creating a new pluggable database has no effect on existing pluggable databases in the pluggable database.

To create a pluggable database using the OCI Console, see Create a Pluggable Database.

Restore

A pluggable database can be restored from a backup. The following two types of restore are supported:

You can perform an in-place restore when you want to move a pluggable database back to a specified state or time. Both the container database and pluggable database must be up and running, and only one pluggable database can be restored at a time.

To restore a pluggable database using the OCI Console, see Restore a Pluggable Database.

Relocate

You can relocate a pluggable database from one container database to another container database within the same availability domain (AD) to the same or a later database version across compartments, DB systems, or VCNs. If two different VCNs are used, then both VCNs must be peered before relocating. During relocation, the pluggable database will be removed from the source container database and moved to the destination container database that is up and running. In a Data Guard association, a pluggable database relocated to the primary will be synchronized with the standby as well.

To relocate a pluggable database using the OCI Console, see Relocate a Pluggable Database.

Clone

A clone is an independent and complete copy of the given database as it existed at the time of the cloning operation. You can create clones of your pluggable database within the same container database or a different container database and refresh the cloned pluggable database.

The following types of clones are supported:

To clone a pluggable database using the OCI Console, see Clone a Pluggable Database.

Refreshable Clone

A refreshable clone enables you to keep your remote clone updated with the source pluggable database.

To create a refreshable clone using the OCI Console, see Clone a Pluggable Database.

To refresh a clone using the OCI Console, see Refresh a Pluggable Database.

Convert Refreshable Clone to Regular Pluggable Database

You can convert a refreshable clone to a regular pluggable database by disconnecting the refreshable clone (destination pluggable database) from the source pluggable database at any time. If the refresh pluggable database is in a Data Guard association, when it is converted to a regular pluggable database, then the pluggable database will be synced to the standby as part of the conversion process.

To convert a pluggable database using the OCI Console, see Convert a Refreshable Clone to a Regular Pluggable Database.

SQL Worksheets

The SQL Worksheet provides a web-based SQL workspace where you can enter SQL statements directly in the browser using a database connection. From the SQL Worksheet, you can run SQL statements or scripts against the database and create database objects.

You need to create a connection to use the SQL Worksheet. The SQL Worksheet utilizes the connection you create with the service to provide you the ability to run SQL commands and scripts from the Console. Scripts used in the SQL Worksheet can reside in either OCI Object Storage or on your local drive. Using the Connection selection menu, you can change the connection that the SQL Worksheet is using instantly.

Connections are resources that contain the necessary information for accessing an Oracle Database in OCI. Connections are created by simply providing information about the location of the database. The connection also contains the user used to access the database and the location of the password that is stored in the OCI Vault.

To create a connection, launch and use the SQL worksheet using the OCI Console, see SQL Worksheets.

Backup

You can take a backup of the pluggable database optionally during create, clone, or relocate operations when the container database is configured with the auto-backup feature. The pluggable database backup destination will always be the same as the container database, and the backups cannot be accessed directly or created on demand. Oracle recommends immediately backing up the pluggable database after you create or clone it. This is because the pluggable database will not be recoverable until the next daily auto-backup completes successfully, leading to a possible data loss.

Open Modes

On the OCI Console, you can see the open modes of a pluggable database, such as read-write, read-only, and mounted. If the pluggable database status is the same across all nodes, the system displays the same status for all pluggable databases. If the pluggable database statuses are different across the nodes, the system displays a message indicating on which nodes the pluggable databases are opened in read-write mode. You cannot change the open mode of a pluggable database through the API or OCI Console. However, you can start or stop a pluggable database. Starting the pluggable database will start it in read-write mode. Stopping the pluggable database will close it, and it will remain in mount mode.

Limitations of Pluggable Database Management