Wednesday, 10 May 2017

Multitenant : Create and Configure a Pluggable Database (PDB) in Oracle Database 12c (12.1 and 12.2) Part- 1

The multitenant option introduced in Oracle Database 12c allows a single container database (CDB) to host multiple separate pluggable databases (PDB). This article covers the options available to create a new pluggable database in an existing container database.

  • Oracle Universal Installer (OUI)

In a previous article we discussed the creation of a pluggable database (PDB) during the creation of the container database (CDB) during the installation of the Oracle software using the Oracle Universal Installer (OUI).

  • Database Configuration Assistant (DBCA)

In a previous article we discussed the creation of a pluggable database (PDB) during the creation of the container database (CDB) using the Database Configuration Assistant (DBCA).

The DBCA includes a new option on the opening "Database Operation" screen that allows you to manage the pluggable databases of an existing container database. Select the "Manage Pluggable Databases" option and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

You can see from the resulting screen what operations are possible with pluggable databases.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The following sections describe some of these options.

    • Create a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database to house the new pluggable database and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select the "Create a new Pluggable Database" option and click the "Next" button. If you were plugging in a previously unplugged database, you would select the PDB Archive or PDB File Set options to match the format of the files containing the unplugged PDB.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Enter the pluggable database name, database location and admin credentials, then click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

If you are happy with the summary information, click the "Finish" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Wait while the pluggable database is unplugged. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The pluggable database has now been unplugged.

    • Unplug a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Unplug a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be unplugged and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select the PDB to unplug, decide whether to use a pluggable database archive or a file set and enter the appropriate location details. Click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

If you are happy with the summary information, click the "Finish" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Wait while the pluggable database is unplugged. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The pluggable database has now been unplugged.

    • Plugin a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database to house the new pluggable database and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select the "Create Pluggable Database From PDB Archive" or "Create Pluggable Database using PDB File Set" option and enter the location of the required files. You can browse for the files using the "Browse" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Enter the pluggable database name, database location and admin credentials, then click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

If you are happy with the summary information, click the "Finish" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Wait while the pluggable database is created. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The pluggable database has been plugged into the container database.

    • Delete a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Delete a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be deleted and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select the PDB to delete and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

If you are happy with the summary information, click the "Finish" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Wait while the pluggable database is deleted. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The pluggable database has been deleted from the container database.

    • Configure a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Configure a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be configured and click the "Next" button.
Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select the PDB to configure and click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Select any additional options you would like to configure, then click the "Next" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

If you are happy with the summary information, click the "Finish" button.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

Wait while the pluggable database is configured. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

Oracle Database Guide, Oracle Database PDB, Pluggable Database

The pluggable database has been configured.