Skip Headers
Oracle® Enterprise Manager Lifecycle Management Administrator's Guide
12c Release 4 (12.1.0.4)

E27046-25
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

16 Managing Pluggable Databases

This chapter explains how you can manage pluggable databases (PDBs) using Oracle Enterprise Manager Cloud Control (Cloud Control). In particular, this chapter covers the following:

16.1 Getting Started

This section helps you get started with this chapter by providing an overview of the steps involved in creating a new pluggable database (PDB), cloning a PDB, migrating a non-container database (CDB) as a PDB, unplugging a PDB, and deleting PDBs. Consider this section to be a documentation map to understand the sequence of actions you must perform to successfully perform these tasks using Cloud Control. Click the reference links provided against the steps to reach the relevant sections that provide more information.

Table 16-1 Getting Started with Pluggable Databases

Step Description Reference Links

Step 1

Obtaining an Overview

Obtain a conceptual overview of PDBs.

To obtain a conceptual overview of PDBs, see Section 16.2.

Step 2

Selecting the Use Case

Among the following use cases, select the one that best matches your requirement:

  • Creating a new PDB

  • Plugging in an unplugged PDB

  • Cloning a PDB

  • Migrating a non-CDB as a PDB

  • Unplugging and dropping a PDB

  • Deleting PDBs

 

Step 3

Meeting the Prerequisites

Meet the prerequisites for the selected use case.

Step 4

Following the Procedure

Follow the procedure for the selected use case.


16.2 Overview

An Oracle Database can contain a portable collection of schemas, schema objects, and nonschema objects, that appear to an Oracle Net client as a separate database. This self-contained collection is called a pluggable database (PDB). A multitenant container database (CDB) is a database that includes one or more PDBs. Oracle Database 12c Release 1 (12.1) and later versions allow you to create many PDBs within a single CDB. Applications that connect to databases view PDBs and earlier versions of Oracle Database (earlier than 12.1) in the same manner.

Cloud Control enables administrators to manage the entire PDB lifecycle, including provisioning CDBs, provisioning PDBs (from the seed or from an unplugged PDB), cloning existing PDBs, migrating non-CDBs as PDBs, unplugging PDBs, and deleting PDBs.

Important:

To manage the PDB lifecycle using Cloud Control, you must have the 12.1.0.3 Enterprise Manager for Oracle Database plug-in, or a later version, deployed. To delete PDBs using Cloud Control, you must have the 12.1.0.5 Enterprise Manager for Oracle Database plug-in deployed.

For information on how to deploy a plug-in and upgrade an existing plug-in, see Oracle Enterprise Manager Cloud Control Administrator's Guide.

Figure 16-1 provides a graphical overview of how you can manage the PDB lifecycle in Cloud Control.

Figure 16-1 Managing Pluggable Databases

Surrounding text describes Figure 16-1 .

For more information about PDBs and CDBs, see the Managing Pluggable Databases part in Oracle Database Administrator's Guide.

16.3 Provisioning Pluggable Databases

You can provision PDBs by creating a new PDB within a CDB, by cloning an existing PDB, or by migrating existing non-CDBs to a CDB as PDBs. You can also use unplugged PDBs for provisioning, by plugging them into a CDB.

This section provides information about provisioning a PDB using the Cloud Control console. In particular, it contains the following:

Note:

You can also provision PDBs using EM CLI. For information on how to do so, see Section A.4.4.

16.3.1 Creating a New Pluggable Database

This section provides information about creating a new PDB. In particular, it contains the following:

16.3.1.1 Prerequisites

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The CDB within which you want to create a PDB must exist, and must be a Cloud Control target.

    Note:

    For information on how to create a new CDB, see Chapter 15.
  • The CDB (within which you want to create a PDB) must not be in read-only, upgrade, or downgrade mode.

  • The target host user must be the owner of the Oracle home that the CDB (within which you want to create the PDB) belongs to.

16.3.1.2 Procedure

To create a new PDB in a CDB, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, under the Container Database section, select the CDB within which you want to create new PDBs.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section, select Create New Pluggable Databases.

  4. Click Launch.

    Figure 16-2 displays the Provision Pluggable Database Console.

    Figure 16-2 Provision Pluggable Database Console

    Surrounding text describes Figure 16-2 .

    Note:

    You will be prompted to log in to the database if you have not already logged in to it through Enterprise Manager. Make sure you log in using sysdba user account credentials.
  5. In the Creation Options page of the Create Pluggable Database Wizard, in the Pluggable Database Creation Options section, select Create a New PDB.

  6. In the Container Database Host Credentials section, select or specify the target CDB Oracle home owner host credentials. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-3 displays the Creation Options page.

    Figure 16-3 Creating a New Pluggable Database: Creation Options Page

    Surrounding text describes Figure 16-3 .
  7. Click Next.

  8. In the Identification page, enter a unique name for the PDB you are creating.

    If you prefer to create more than one PDB in this procedure, then select Create Multiple Copies, and set the number of PDBs that you want to create. Note that you can create a maximum of 252 PDBs within a CDB.

    Note:

    If you choose to create multiple PDBs, then the unique name you enter here is used as a prefix for all PDBs, and the suffix is a numeric value that indicates the count of PDBs.

    For example, if you create five PDBs with the name accountsPDB, then the PDBs are created with the names accountsPDB1, accountsPDB2, accountsPDB3, accountsPDB4, and accountsPDB5.

  9. In the PDB Administrator section, enter the credentials of the admin user account you need to create for administering the PDB.

    Figure 16-4 displays the Identification page.

    Figure 16-4 Creating a New Pluggable Database: Identification Page

    Surrounding text describes Figure 16-4 .

    Note:

    If you choose to create multiple PDBs, then an admin user account is created for each PDB that you create, with the same set of the specified credentials.
  10. Click Next.

  11. In the Storage page, in the PDB Datafile Locations section, select the type of location where you want to store the datafiles.

    • If the target CDB (CDB in which you are creating the PDB) is enabled with Oracle Managed Files and if you want to use the same, then select Use Oracle Managed Files (OMF).

    • If you want to enter a custom location, then select Use Common Location for PDB Datafiles. Select the storage type and the location where the datafiles can be stored.

  12. In the Temporary Working Directory section, enter a location where the temporary files generated during the PDB creation process can be stored.

  13. In the Post-Creation Scripts section, select a custom SQL script you want to run as part of this procedure, once the PDB is created.

    Figure 16-5 displays the Storage page.

    Figure 16-5 Creating a New Pluggable Database: Storage Page

    Surrounding text describes Figure 16-5 .
  14. Click Next.

  15. In the Schedule page, enter a unique deployment procedure instance name and a schedule for the deployment. The instance name you enter here helps you identify and track the progress of this procedure on the Procedure Activity page.

    If you want to run the procedure immediately, then retain the default selection, that is, Immediately. Otherwise, select Later and provide time zone, start date, and start time details.

    You can optionally set a grace period for this schedule. A grace period is a period of time that defines the maximum permissible delay when attempting to run a scheduled procedure. If the procedure does not start within the grace period you have set, then the procedure skips running. To set a grace period, select Grace Period, and set the permissible delay time.

    Figure 16-6 displays the Schedule page.

    Figure 16-6 Creating a New Pluggable Database: Schedule Page

    Surrounding text describes Figure 16-6 .
  16. Click Next.

  17. In the Review page, review the details you have provided for the deployment procedure. If you are satisfied with the details, click Submit.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    Figure 16-7 displays the Review page.

    Figure 16-7 Creating a New Pluggable Database: Review Page

    Surrounding text describes Figure 16-7 .
  18. In the Procedure Activity page, view the status of the procedure. From the Procedure Actions menu, you can select Debug to set the logging level to Debug, and select Stop to stop the procedure execution.

    Figure 16-8 displays the Procedure Activity page.

    Figure 16-8 Creating a New Pluggable Database: Procedure Activity Page

    Surrounding text describes Figure 16-8 .

    When you create a new PDB, the Enterprise Manager job system creates a Create Pluggable Database job. For information about viewing the details of this job, see Section 16.5.1.

16.3.2 Plugging In an Unplugged Pluggable Database

This section provides information about plugging in an unplugged PDB into a CDB. In particular, it contains the following:

16.3.2.1 Prerequisites

Before plugging in an unplugged PDB, ensure that you meet the following prerequisites:

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The target CDB (the CDB within which you want to plug in the unplugged PDB) must exist, and must be a Cloud Control target.

    Note:

    For information on how to create a new CDB, see Chapter 15.
  • The target CDB must not be in read-only, upgrade, or downgrade mode.

  • The XML file that describes the unplugged PDB, and the other files associated with the unplugged PDB, such as the datafiles and the wallet file, must exist and must be readable.

  • The target host user must be the owner of the Oracle home that the CDB (within which you want to plug in the unplugged PDB) belongs to.

  • The platforms of the source CDB host (the host on which the CDB that previously contained the unplugged PDB is installed) and the target CDB host (the host on which the target CDB is installed) must have the same endianness, and must have compatible database options installed.

  • The source CDB (the CDB that previously contained the unplugged PDB) and the target CDB must have compatible character sets and national character sets. Every character in the source CDB character set must be available in the target CDB character set, and the code point value of every character available in the source CDB character set must be the same in the target CDB character set.

16.3.2.2 Procedure

To plug in an unplugged PDB to a CDB, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, under the Container Database section, select the CDB to which you want to add the unplugged PDBs.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section, select Create New Pluggable Databases.

  4. Click Launch.

    Figure 16-9 displays the Provision Pluggable Database Console.

    Figure 16-9 Provision Pluggable Database Console

    Surrounding text describes Figure 16-9 .

    Note:

    You will be prompted to log in to the database if you have not already logged in to it through Enterprise Manager. Make sure you log in using sysdba user account credentials.
  5. In the Creation Options page of the Create Pluggable Database Wizard, in the Pluggable Database Creation Options section, select Plug an Unplugged PDB.

  6. In the Container Database Host Credentials section, select or specify the target CDB Oracle home owner host credentials. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-10 displays the Creation Options page.

    Figure 16-10 Plugging In an Unplugged Pluggable Database: Creation Options Page

    Surrounding text describes Figure 16-10 .
  7. Click Next.

  8. In the Identification page, enter a unique name for the PDB you are plugging in.

    Select Create As Clone to ensure that Oracle Database generates a unique PDB DBID, GUID, and other identifiers expected for the new PDB.

    If you prefer to create more than one PDB in this procedure, then select Create Multiple Copies, and set the number of PDBs that you want to create. Note that you can create a maximum of 252 PDBs within a CDB.

    Note:

    If you choose to create multiple PDBs, then the unique name you enter here is used as a prefix for all PDBs, and the suffix is a numeric value that indicates the count of PDBs.

    For example, if you create five PDBs with the name accountsPDB, then the PDBs are created with the names accountsPDB1, accountsPDB2, accountsPDB3, accountsPDB4, and accountsPDB5.

  9. In the PDB Administrator section, do one of the following to administer the PDB:

    • If you prefer to use the admin user account that was created as part of the source PDB that you are plugging in, then deselect Create PDB Administrator.

    • If you want to create a brand new admin user account for the PDB you are plugging in, then select Create PDB Administrator, and enter the desired credentials.

    Note:

    If you choose to create multiple PDBs, then an admin user account is created for each PDB that you create, with the same set of the specified credentials.

    To lock and expire all the users in the newly created PDB, (except the newly created Admin), select Lock All Existing PDB Users.

    Figure 16-11 displays the Identification page.

    Figure 16-11 Plugging In an Unplugged Pluggable Database: Identification Page

    Surrounding text describes Figure 16-11 .
  10. In the PDB Template Location section, select the location where the source PDB's template is available, and then select the type of PDB template.

    • If the PDB template is available on your CDB host (CDB to which you are plugging in the unplugged PDB), then select Target Host File System.

      • If the PDB template is a single archive file—a TAR file with datafiles and metadata XML file included in it, then select Create the PDB from PDB Archive, then select the PDB template.

      • If the PDB template is a PDB file set—a separate DFB file with all the datafiles and a separate metadata XML file, then select Create the PDB using PDB File Set, then select the DBF and XML files.

      • If you want to plug in a PDB using the PDB metadata XML file and the existing datafiles, then select Create PDB using Metadata file.

    • If the PDB template is available in Oracle Software Library (Software Library), then select Software Library, then select the component in the Software Library that contains the PDB template.

    Figure 16-12 displays the PDB Template Location section of the Identification page.

    Figure 16-12 Plugging In an Unplugged Pluggable Database: PDB Template Location Section

    Surrounding text describes Figure 16-12 .
  11. Click Next.

  12. In the Storage page, do one of the following:

    • In the previous page, if you chose to create the PDB from a pluggable database archive (single TAR file) or using a pluggable database file set (DFB file and an XML file), then select the type of location where you want to store the target datafiles for the PDB you are plugging in.

      • If the target CDB (CDB to which you are plugging in the unplugged PDB) is enabled with Oracle Managed Files and if you want to use the same, then select Use Oracle Managed Files (OMF).

      • If you want to enter a common custom location, then select Use Common Location for PDB datafiles. Select the storage type and the location where the datafiles can be stored.

    • In the previous page, if you chose to create the PDB using a pluggable database template (XML file only), then do the following:

      In the PDB Datafile Locations section, validate the locations mapped for the datafiles. If they are incorrect, correct the paths. Alternatively, if you have a single location where the datafiles are all available, then enter the absolute path in the Set Common Source File Mapping Location field, and click Set.

      You can choose to store the target datafiles for the PDB you are plugging in, in the same location as the source datafiles. However, if you want the target datafiles to be stored in a different location, then select Copy Datafiles, and select the type of location:

      • If the target CDB (CDB to which you are plugging in the unplugged PDB) is enabled with Oracle Managed Files and if you want to use the same, then select Use Oracle Managed Files (OMF).

      • If you want to enter a common custom location, then select Use Common Location for Pluggable Database Files. Select the storage type and the location where the datafiles can be stored.

      • If you prefer to use different custom locations for different datafiles, then select Customized Location, and enter the custom location paths.

  13. In the Temporary Working Directory section, enter a location where the temporary files generated during the PDB creation process can be stored.

  14. In the Post-Creation Scripts section, select a custom SQL script you want to run as part of this procedure, once the PDB is plugged in.

    If the script is available in the Software Library, select Select from Software Library, then select the component that contains the custom script.

    Figure 16-13 displays the Storage page.

    Figure 16-13 Plugging In an Unplugged Pluggable Database: Storage Page

    Surrounding text describes Figure 16-13 .
  15. Click Next.

  16. In the Schedule page, enter a unique deployment procedure instance name and a schedule for the deployment. The instance name you enter here helps you identify and track the progress of this procedure on the Procedure Activity page.

    If you want to run the procedure immediately, then retain the default selection, that is, Immediately. Otherwise, select Later and provide time zone, start date, and start time details.

    You can optionally set a grace period for this schedule. A grace period is a period of time that defines the maximum permissible delay when attempting to run a scheduled procedure. If the procedure does not start within the grace period you have set, then the procedure skips running. To set a grace period, select Grace Period, then set the permissible delay time.

    Figure 16-14 displays the Schedule page.

    Figure 16-14 Plugging In an Unplugged Pluggable Database: Schedule Page

    Surrounding text describes Figure 16-14 .
  17. Click Next.

  18. In the Review page, review the details you have provided for the deployment procedure. If you are satisfied with the details, click Submit.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    Figure 16-15 displays the Review page.

    Figure 16-15 Plugging In an Unplugged Pluggable Database: Review Page

    Surrounding text describes Figure 16-15 .
  19. In the Procedure Activity page, view the status of the procedure. From the Procedure Actions menu, you can select Debug to set the logging level to Debug, and select Stop to stop the procedure execution.

    Figure 16-16 displays the Procedure Activity page.

    Figure 16-16 Plugging In an Unplugged Pluggable Database: Procedure Activity Page

    Surrounding text describes Figure 16-16 .

    When you plug in an unplugged PDB, the Enterprise Manager job system creates a Create Pluggable Database job. For information about viewing the details of this job, see Section 16.5.1.

16.3.3 Cloning a Pluggable Database

You can clone a PDB using either the Full Clone method, or the Snap Clone method. This section provides information about cloning a PDB using these methods. In particular, it contains the following:

16.3.3.1 Prerequisites

To clone a PDB, you must meet the following prerequisites:

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The source PDB (the PDB that you want to clone) must exist, and must be a Cloud Control target.

    Note:

    For information on how to create a new PDB, see Section 16.3.1.
  • The source PDB must be open.

  • The target CDB (the CDB into which you want to plug in the cloned PDB) must exist, and must be a Cloud Control target.

    Note:

    For information on how to create a new CDB, see Chapter 15.
  • The target CDB must not be in read-only, upgrade, or downgrade mode.

  • The target host user must be the owner of the Oracle home that the target CDB belongs to.

To clone a PDB using the Snap Clone method, you must meet the following additional prerequisites:

  • The 12.1.0.5 Enterprise Manager for Oracle Database plug-in must be downloaded and deployed. Also, the 12.1.0.3 SMF plug-in or higher must be downloaded and deployed.

  • The PDB that you want to clone must reside on a registered storage server. This storage server must be synchronized.

    For information on how to register a storage server and synchronize storage servers, see Oracle Enterprise Manager Cloud Administration Guide.

  • All the datafiles of the PDB that you want to clone must reside on the storage volumes of the storage server, and not on the local disk.

  • Metric collections must be run on the source CDB (the CDB containing the PDB that you want to clone), the source CDB host, and the PDB that you want to clone.

  • The Snap Clone feature must be enabled for the PDB that you want to clone.

    For information on how to enable the Snap Clone feature, see Oracle Enterprise Manager Cloud Administration Guide.

16.3.3.2 Procedure

To clone an existing PDB using either the Full Clone or the Snap Clone method, follow these steps:

Important:

If you use the Full Clone method to clone a PDB, you can clone the PDB only to the source CDB (the CDB containing the PDB that you are cloning).
  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, in the CDB section, select the CDB to which you want to add the cloned PDB.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section, select Create New Pluggable Databases.

  4. Click Launch.

    Figure 16-17 displays the Provision Pluggable Database Console.

    Figure 16-17 Provision Pluggable Database Console

    Surrounding text describes Figure 16-17 .

    Note:

    You will be prompted to log in to the database if you have not already logged in to it through Enterprise Manager. Make sure you log in using sysdba user account credentials.
  5. In the Creation Options page of the Create Pluggable Database Wizard, in the PDB Creation Options section, select Clone an Existing PDB.

    To clone a PDB using the traditional method of cloning the PDB datafiles, select Full Clone. Use this method if you want to clone a PDB for long term usage. This method is ideal for load testing, when you plan to make significant data updates to the PDB clone. However, this method takes a longer period of time, and a clone that is created using this method occupies a fairly large amount of space, as compared to the Snap Clone method.

    To clone a PDB using the Storage Management Framework (SMF) Snap Clone feature, select Snap Clone. Use this method if you want to clone a PDB for short term purposes. This method is ideal for functional testing, as the cloning process is quick, and a PDB clone that is created using this method occupies very little space. However, this method is not suitable if you plan to make significant data updates to the PDB clone.

    For Source PDB, select the PDB that you want to clone.

    Figure 16-18 displays the PDB Creation Options section of the Creation Options page.

    Figure 16-18 Cloning a Pluggable Database: Specifying Creation Options

    Surrounding text describes Figure 16-18 .
  6. In the CDB Host Credentials section, select or specify the target CDB Oracle Home owner host credentials. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-19 displays the CDB Host Credentials section of the Creation Options page.

    Figure 16-19 Cloning a Pluggable Database: Specifying CDB Host Credentials

    Surrounding text describes Figure 16-19 .
  7. Click Next.

  8. In the Identification page, enter a unique name for the PDB you are cloning.

    If you prefer to create more than one PDB in this procedure, then select Create Multiple Copies, and set the number of PDBs you want to create. Note that you can create a maximum of 252 PDBs.

    Note:

    If you choose to create multiple PDBs, then the unique name you enter here is used as a prefix for all the cloned PDBs, and the suffix is a numeric value that indicates the count of PDBs.

    For example, if you create five PDBs with the name accountsPDB, then the PDBs are created with the names accountsPDB1, accountsPDB2, accountsPDB3, accountsPDB4, and accountsPDB5.

  9. In the PDB Administrator section, do one of the following to administer the PDB:

    • If you prefer to use the admin user account that was created as part of the source PDB that you are cloning, then deselect Create PDB Administrator.

    • If you want to create a brand new admin user account for the PDB you are cloning, then select Create PDB Administrator, and enter the desired credentials.

    Figure 16-20 displays the Identification page.

    Figure 16-20 Cloning a Pluggable Database: Identification Page

    Surrounding text describes Figure 16-20 .

    Note:

    If you choose to create multiple PDBs, then an admin user account is created for each PDB that you create, with the same set of the specified credentials.
  10. In the Source CDB Login Credentials section, select or specify the login credentials of the source CDB. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    The credentials are used to bring the source PDB to read-only mode before the cloning operation begins, and to restore it to the original state after the cloning operation ends.

    If you chose the Snap Clone method (on the Source page of the Create Pluggable Database Wizard) to clone the PDB, specify the host credentials for the source CDB.

    Note:

    If you are cloning the source PDB to the source CDB itself, then the Source CDB Login Credentials section is not displayed, that is, you do not need to provide the source CDB login credentials or the source CDB host credentials.

    If you are cloning the source PDB to a CDB different from the source CDB, and this CDB resides on the source CDB host, then you must provide the source CDB login credentials. You do not need to provide the source CDB host credentials.

    If you are cloning the source PDB to a CDB different from the source CDB, and this CDB resides on a host different from the source CDB host, then you must provide the source CDB login credentials and the source CDB host credentials.

  11. Click Next.

  12. In the Storage page, specify the storage information.

    If you chose the Full Clone method to clone the PDB, select the type of location where you want to store the PDB datafiles in the following manner:

    • If the source CDB is enabled with Oracle Managed Files and if you want to use the same, then select Use Oracle Managed Files (OMF).

    • If you want to enter a custom location, then select Use Common Location for PDB Datafiles. Select the storage type and the location where the datafiles can be stored.

    Figure 16-21 displays the Storage page for the Full Clone method.

    Figure 16-21 Cloning a Pluggable Database (Full Clone): Storage Page

    Surrounding text describes Figure 16-21 .

    If you chose the Snap Clone method to clone the PDB, do the following:

    • In the PDB Datafile Locations section, specify a value for Mount Point Prefix, that is, the mount location for the storage volumes. You can choose to specify the same prefix for all the volumes, or a different prefix for each volume. Also, specify a value for Writable Space, that is, the space that you want to allocate for writing the changes made to the PDB clone. You can choose to specify the same writable space value for all the volumes, or a different value for each volume.

    • In the Privileged Host Credentials section, select or specify the credentials of the root user. These credentials are used for mounting the cloned volumes on the destination host.

      If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-22 displays the Storage page for the Snap Clone method.

    Figure 16-22 Cloning a Pluggable Database (Snap Clone): Storage Page

    Surrounding text describes Figure 16-22 .
  13. In the Temporary Working Directory section, enter a location where the temporary files generated during the PDB creation process can be stored.

  14. In the Post-Creation Scripts section, select a custom SQL script you want to run as part of this procedure, once the PDB is cloned.

  15. Click Next.

  16. In the Schedule page, enter a unique deployment procedure instance name and a schedule for the deployment. The instance name you enter here helps you identify and track the progress of this procedure on the Procedure Activity page.

    If you want to run the procedure immediately, then retain the default selection, that is, Immediately. Otherwise, select Later and provide time zone, start date, and start time details.

    You can optionally set a grace period for this schedule. A grace period is a period of time that defines the maximum permissible delay when attempting to run a scheduled procedure. If the procedure does not start within the grace period you have set, then the procedure skips running. To set a grace period, select Grace Period, and set the permissible delay time.

    Figure 16-23 displays the Schedule page.

    Figure 16-23 Cloning a Pluggable Database: Schedule Page

    Surrounding text describes Figure 16-23 .
  17. Click Next.

  18. In the Review page, review the details you have provided for the deployment procedure. If you are satisfied with the details, click Submit.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    Figure 16-24 displays the Review page.

    Figure 16-24 Cloning a Pluggable Database: Review Page

    Surrounding text describes Figure 16-24 .
  19. In the Procedure Activity page, view the status of the procedure. From the Procedure Actions menu, you can select Debug to set the logging level to Debug, and select Stop to stop the procedure execution.

    Figure 16-25 displays the Procedure Activity page.

    Figure 16-25 Cloning a Pluggable Database: Procedure Activity Page

    Surrounding text describes Figure 16-25 .

    When you clone a PDB, the Enterprise Manager job system creates a Create Pluggable Database job. For information about viewing the details of this job, see Section 16.5.1.

16.3.4 Migrating a Non-CDB as a Pluggable Database

This section provides information about migrating a non-CDB as a PDB. In particular, it contains the following:

16.3.4.1 Prerequisites

Before migrating a non-CDB as a PDB, ensure that you meet the following prerequisites:

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The target CDB (the CDB to which you want to migrate a non-CDB as a PDB) must exist, and must be a Cloud Control target.

    Note:

    For information on how to create a new CDB, see Chapter 15.
  • The target CDB must not be in read-only, upgrade, or downgrade mode.

  • The non-CDB that you want to migrate and the target CDB must be running in ARCHIVELOG mode.

    For information on setting the archiving mode of a database, see Oracle Database Administrator's Guide.

  • The database administrators of the database you want to migrate, and the target CDB must have SYSDBA privileges.

  • The target host user must be the owner of the Oracle home that the target CDB belongs to.

16.3.4.2 Procedure

To migrate a non-CDB as a PDB, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, in the CDB section, select the CDB to which you want to migrate a non-CDB as a PDB.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section of the Provision Pluggable Database page, select the Migrate Existing Databases option and click Launch.

    Figure 16-26 displays the Provision Pluggable Database Console.

    Figure 16-26 Provision Pluggable Database Console

    Surrounding text describes Figure 16-26 .
  4. On the Database Login page, select the Credential Name from the drop-down list. Click Login.

  5. On the Migrate Non-CDBs launch page, select a data migration method, that is, Export/Import or Plug as a PDB. If you select Plug as a PDB, ensure that the non-CDB that you want to migrate is open, and is in read-only mode.

    Enter the appropriate credentials for the Oracle Home Credential section.

    Click Next.

    Figure 16-27 displays the Method page.

    Figure 16-27 Migrating a Non-CDB: Method Page

    Surrounding text describes Figure 16-27 .
  6. On the Database page, select a Non-CDB to be migrated. You can select more than one. Click Add. In the database pane, provide the appropriate credential, properties, export, import, and datafile location information. Click Next.

    Figure 16-28 displays how to select the non-CDB you want to migrate.

    Figure 16-28 Migrating a Non-CDB: Selecting a Non-CDB

    Surrounding text describes Figure 16-28 .

    Figure 16-29 displays how to specify the database and database host credentials.

    Figure 16-29 Migrating a Non-CDB: Specifying Credentials

    Surrounding text describes Figure 16-29 .

    Figure 16-30 displays how to specify the stage location for migration.

    Figure 16-30 Migrating a Non-CDB: Specifying Stage Location

    Surrounding text describes Figure 16-30 .

    Figure 16-31 displays how to specify the PDB administrator details and datafile location.

    Figure 16-31 Migrating a Non-CDB: Specifying PDB Properties and Datafile Location

    Surrounding text describes Figure 16-31 .

    Figure 16-32 displays how to specify the import directory.

    Figure 16-32 Migrating a Non-CDB: Specifying Import Directory

    Surrounding text describes Figure 16-32 .
  7. On the Schedule page, enter the appropriate job and scheduling details. Click Next.

    Figure 16-33 displays the Schedule page.

    Figure 16-33 Migrating a Non-CDB: Schedule Page

    Surrounding text describes Figure 16-33 .
  8. On the Review page, review all details entered. If there are no changes required, click Submit.

    Figure 16-34 displays the Review page.

    Figure 16-34 Migrating a Non-CDB: Review Page

    Surrounding text describes Figure 16-34 .

16.4 Removing Pluggable Databases

This section provides information related to unplugging PDBs and deleting PDBs. In particular, it contains the following:

16.4.1 Unplugging and Dropping a Pluggable Database

This section provides information about unplugging and dropping a PDB. In particular, it contains the following:

Note:

As an alternative to using the method described in this section, you can use EM CLI to unplug and drop PDBs. For more information, see Section A.4.4.4.

16.4.1.1 Prerequisites

Before unplugging and dropping a PDB, ensure that you meet the following prerequisites:

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The PDB that you want to unplug and drop must have been opened at least once.

  • The target host user must be the owner of the Oracle home that the CDB (containing the PDB that you want to unplug and drop) belongs to.

16.4.1.2 Procedure

To unplug a PDB from its CDB, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, in the CDB section, select the CDB from which you want to unplug the PDBs.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section, select Unplug Pluggable Database.

  4. Click Launch.

    Figure 16-35 displays the Provision Pluggable Database Console.

    Figure 16-35 Provision Pluggable Database Console

    Surrounding text describes Figure 16-35 .

    Note:

    You will be prompted to log in to the database if you have not already logged in to it through Enterprise Manager. Make sure you log in using sysdba user account credentials.
  5. In the Select PDB page of the Unplug Pluggable Database Wizard, in the Select Pluggable Database section, select the PDB you want to unplug. Note that the PDB once unplugged will be stopped and dropped.

  6. In the CDB Host Credentials section, select or specify the target CDB Oracle Home owner host credentials. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-36 displays the Select PDB page.

    Figure 16-36 Unplugging a Pluggable Database: Select PDB Page

    Surrounding text describes Figure 16-36 .
  7. In the Destination page, select the type of PDB template you want to generate for unplugging the PDB, and the location where you want to store it. The PDB template consists of all datafiles as well as the metadata XML file.

    • If you want to store the PDB template on your CDB host (CDB from where you are unplugging the PDB), then select Target Host File System.

      • If you want to generate a single archive file—a TAR file with the datafiles and the metadata XML file included in it, then select Generate PDB Archive. Select a location where the archive file can be created.

        Note:

        Oracle recommends you to select this option if the source and target CDBs are using file system for storage. This option is not supported for PDBs using ASM as storage.
      • If you want to generate an archive file set—a separate DFB file with all the datafiles and a separate metadata XML file, then select Generate PDB File Set. Select the locations where the DBF and XML files can be created.

        Note:

        Oracle recommends you to select this option if the source and target CDBs are using ASM for storage.
      • If you want to generate only a metadata XML file, leaving the datafiles in their current location, then select Generate PDB Metadata File. Select a location where the metadata XML file can be created.

    • If you want to store the PDB template in Oracle Software Library (Software Library), then select Software Library.

      • If you want to generate a single archive file—a TAR file with the datafiles and the metadata XML file included in it, then select Generate PDB Archive. If you want to generate an archive file set—a separate DFB file with all the datafiles and a separate metadata XML file, then select Generate PDB File Set. If you want to generate only a metadata XML file, leaving the datafiles in their current location, then select Generate PDB Metadata File.

      • Enter a unique PDB template name.

        The template is created in the default location that has the following format:

        Database Configuration/<db_release>/<platform>/Database Templates

        For example,

        Database Configuration/12.1.0.0.2/unix/Database Templates

      • Enter a temporary location where the archive can be created by Enterprise Manager before it is uploaded to the Software Library.

    Figure 16-37 displays the Destination page.

    Figure 16-37 Unplugging a Pluggable Database: Destination Page

    Surrounding text describes Figure 16-37 .
  8. In the Schedule page, enter a unique deployment procedure instance name and a schedule for the deployment. The instance name you enter here helps you identify and track the progress of this procedure on the Procedure Activity page.

    If you want to run the procedure immediately, then retain the default selection, that is, Immediately. Otherwise, select Later and provide time zone, start date, and start time details.

    You can optionally set a grace period for this schedule. A grace period is a period of time that defines the maximum permissible delay when attempting to run a scheduled procedure. If the procedure does not start within the grace period you have set, then the procedure skips running. To set a grace period, select Grace Period, and set the permissible delay time.

    Figure 16-38 displays the Schedule page.

    Figure 16-38 Unplugging a Pluggable Database: Schedule Page

    Surrounding text describes Figure 16-38 .
  9. Click Next.

  10. In the Review page, review the details you have provided for the deployment procedure. If you are satisfied with the details, click Submit.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    Figure 16-39 displays the Review page.

    Figure 16-39 Unplugging a Pluggable Database: Review Page

    Surrounding text describes Figure 16-39 .
  11. In the Procedure Activity page, view the status of the procedure. From the Procedure Actions menu, you can select Debug to set the logging level to Debug, and select Stop to stop the procedure execution.

    When you unplug and drop a PDB, the Enterprise Manager job system creates an Unplug Pluggable Database job. For information about viewing the details of this job, see Section 16.5.2.

16.4.2 Deleting Pluggable Databases

This section provides information about permanently deleting PDBs from a CDB. In particular, it contains the following:

16.4.2.1 Prerequisites

Before permanently deleting a set of PDBs from a CDB, ensure that you meet the following prerequisites:

  • The 12.1.0.5 Enterprise Manager for Oracle Database plug-in must be downloaded and deployed.

    For information on how to download and deploy a plug-in, see Oracle Enterprise Manager Cloud Control Administrator's Guide.

  • Oracle Software Library (Software Library) must be set up in Cloud Control.

    For information on how to set up Software Library in Cloud Control, see Section 2.2.

  • The PDBs that you want to delete must have been opened at least once.

  • The target host user must be the owner of the Oracle home that the CDB (containing the PDBs that you want to delete) belongs to.

16.4.2.2 Procedure

To permanently delete a set of PDBs from a CDB, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Database Provisioning. In the Database Provisioning page, in the Related Links section of the left menu pane, click Provision Pluggable Databases.

    Note:

    You can also access the Provision Pluggable Database Console from the home page of the CDB. To do so, in the CDB's home page, from the Oracle Database menu, select Provisioning, then select Provision Pluggable Database.
  2. In the Provision Pluggable Database Console, in the CDB section, select the CDB from which you want to delete the PDBs.

    Note:

    Skip this step if you have accessed the Provision Pluggable Database Console from the CDB's home page.
  3. In the PDB Operations section, select Delete Pluggable Databases.

  4. Click Launch.

    Figure 16-40 displays the Provision Pluggable Database Console.

    Figure 16-40 Provision Pluggable Database Console

    Surrounding text describes Figure 16-40 .

    Note:

    You will be prompted to log in to the database if you have not already logged in to it through Enterprise Manager. Make sure you log in using sysdba user account credentials.
  5. In the Select PDBs page of the Delete Pluggable Databases Wizard, click Add. Select the PDBs that you want to delete, then click Select.

    Note:

    If you choose to delete a PDB that was created using the Snap Clone method, the PDB mount points on the CDB host are cleaned up. The corresponding storage volumes on the storage server are also deleted. This action is irreversible.

    Figure 16-41 displays the Select PDBs page.

    Figure 16-41 Deleting Pluggable Databases: Select PDBs

    Surrounding text describes Figure 16-41 .
  6. In the CDB Host Credentials section, select or specify the target CDB Oracle Home owner host credentials. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    If one (or more) of the PDBs that you selected for deletion is the Snap Clone of another PDB, you must also provide the privileged host credentials, that is, the credentials of the root user. If you have already registered the credentials with Enterprise Manager, you can select Preferred or Named. Otherwise, you can select New and enter the credentials.

    Figure 16-42 displays the CDB Host Credentials section of the Select PDBs page.

    Figure 16-42 Deleting Pluggable Databases: Specifying Credentials

    Surrounding text describes Figure 16-42 .
  7. In the Schedule page, enter a unique deployment procedure instance name and a schedule for the deployment. The instance name you enter here helps you identify and track the progress of this procedure on the Procedure Activity page.

    If you want to run the procedure immediately, then retain the default selection, that is, Immediately. Otherwise, select Later and provide time zone, start date, and start time details.

    You can optionally set a grace period for this schedule. A grace period is a period of time that defines the maximum permissible delay when attempting to run a scheduled procedure. If the procedure does not start within the grace period you have set, then the procedure skips running. To set a grace period, select Grace Period, and set the permissible delay time.

    Figure 16-43 displays the Schedule page.

    Figure 16-43 Deleting Pluggable Databases: Schedule Page

    Surrounding text describes Figure 16-43 .
  8. Click Next.

  9. In the Review page, review the details you have provided for the deployment procedure. If you are satisfied with the details, click Submit.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    Figure 16-44 displays the Review page.

    Figure 16-44 Deleting Pluggable Databases: Review Page

    Surrounding text describes Figure 16-44 .
  10. In the Procedure Activity page, view the status of the procedure. From the Procedure Actions menu, you can select Debug to set the logging level to Debug, and select Stop to stop the procedure execution.

    Figure 16-45 displays the Procedure Activity page.

    Figure 16-45 Deleting Pluggable Databases: Procedure Activity Page

    Surrounding text describes Figure 16-45 .

    When you delete a PDB, the Enterprise Manager job system creates a Delete Pluggable Database job. For information about viewing the details of this job, see Section 16.5.3.

16.5 Viewing Pluggable Database Job Details

This section provides information about viewing the details of the jobs that are created by the Enterprise Manager job system when you create a PDB, unplug a PDB, or delete a PDB. It contains the following:

16.5.1 Viewing Create Pluggable Database Job Details

To view the details of a create PDB job, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Procedure Activity.

  2. Click the deployment procedure that contains the required create PDB job.

    Description of pdb_create_job1_new.jpg follows
    Description of the illustration pdb_create_job1_new.jpg

  3. Expand the deployment procedure steps. Select the PDB creation job.

    Description of pdb_create_job2_new.jpg follows
    Description of the illustration pdb_create_job2_new.jpg

  4. Click Job Summary.

    Description of pdb_create_job3_new.jpg follows
    Description of the illustration pdb_create_job3_new.jpg

  5. To view a summary of the job details, click Summary.

    In the Prepare Configuration Data step, the system prepares for PDB creation.

    In the Check Prerequisites step, the system checks the prerequisites for PDB creation.

    In the Verify and Prepare step, the system runs tasks prior to PDB creation.

    In the Perform Configuration step, the PDB creation is performed. For details of the performed tasks and their status, refer to the remote log files present on the host.

    In the Post Configuration step, Enterprise Manager is updated with the newly created PDB details, and the custom scripts are run.

  6. To view a visual representation of the create PDB job progress, click Results.

    In the Configuration Progress section, you can view the completion percentage of the job, and a list of pending, currently running, and completed job steps. You can also view errors, warnings, and logs. The tail of the log for the currently running job step is displayed.

16.5.2 Viewing Unplug Pluggable Database Job Details

To view the details of an unplug PDB job, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Procedure Activity.

  2. Click the deployment procedure that contains the required unplug PDB job.

    Description of pdb_job_unplug_1_new.jpg follows
    Description of the illustration pdb_job_unplug_1_new.jpg

  3. Expand the deployment procedure steps. Select the unplug PDB job.

    Description of pdb_job_unplug_2.jpg follows
    Description of the illustration pdb_job_unplug_2.jpg

  4. Click Job Summary.

  5. To view a summary of the job details, click Summary.

    In the Prepare Configuration Data step, the system prepares for unplugging a PDB.

    In the Check Prerequisites step, the system checks the prerequisites for unplugging a PDB.

    In the Verify and Prepare step, the system runs tasks prior to unplugging the PDB.

    In the Perform Configuration step, the PDB unplugging is performed. For details of the performed tasks and their status, refer to the remote log files present on the host.

    In the Post Configuration step, Enterprise Manager is updated with the unplugged PDB details.

  6. To view a visual representation of the unplug PDB job progress, click Results.

    In the Configuration Progress section, you can view the completion percentage of the job, and a list of pending, currently running, and completed job steps. You can also view errors, warnings, and logs. The tail of the log for the currently running job step is displayed.

16.5.3 Viewing Delete Pluggable Database Job Details

To view the details of a delete PDB job, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Procedure Activity.

  2. Click the deployment procedure that contains the required delete PDB job.

    Description of pdb_delete_job1.jpg follows
    Description of the illustration pdb_delete_job1.jpg

  3. Expand the deployment procedure steps. Select the delete PDB job.

    Description of pdb_delete_job2.jpg follows
    Description of the illustration pdb_delete_job2.jpg

  4. Click Job Summary.

    Description of pdb_delete_job3.jpg follows
    Description of the illustration pdb_delete_job3.jpg

  5. To view a summary of the job details, click Summary.

    In the Prepare Configuration Data step, the system prepares for deleting the PDBs.

    In the Verify and Prepare step, the system runs tasks prior to deleting the PDBs.

    In the Perform Configuration step, the PDB deletion is performed. For details of the performed tasks and their status, refer to the remote log files present on the host.

    In the Post Configuration step, Enterprise Manager is updated with the deleted PDB details.

  6. To view a visual representation of the delete PDB job progress, click Results.

    In the Configuration Progress section, you can view the completion percentage of the job, and a list of pending, currently running, and completed job steps. You can also view errors, warnings, and logs. The tail of the log for the currently running job step is displayed.

16.6 Administering Pluggable Databases

This section provides information about performing PDB administration tasks. It contains the following:

16.6.1 Switching Between Pluggable Databases

If you are performing a task such as granting user privileges or performance reporting, and you need to perform the same task on another PDB, then you can switch to another PDB. To switch between PDBs while staying on the same feature page, follow these steps:

  1. From the current PDB, select any PDB scope page (such as, Manage Advanced Queues).

    In the upper-left corner of the window, the name of the PDB will update to display a context switcher as a drop-down menu.

  2. Click the context switcher to display the drop-down menu. This menu shows the PDBs most recently used.

    Select a PDB from this list.

  3. The page will update to show the System Queues.

  4. Click the context switcher to display the drop-down menu. If the menu does not show the PDBs you want, then select All Containers.

  5. A Switch Container window will pop up to display all available PDBs for the monitored target.

    Select a PDB from this list and click OK.

  6. The page will update to show data for the selected PDB.

16.6.2 Altering Pluggable Database State

To change the state of a single-instance PDB to Open or Close, follow these steps:

  1. From the Oracle Database menu, select Control, then select Open/Close Pluggable Database.

  2. From the Open/Close PDB page, select a PDB from the list.

  3. Click the Action drop-down menu and select the appropriate actions. Your choices are Open, Open Read Only, and Close.

  4. In the Confirmation dialog window, click Yes to complete the change. A Processing dialog window appears to show you the progress of your choice.

  5. Once state change completes, the Open/Close PDB page will update to show the new state of the PDB.

To change the state of a PDB in a Cluster/RAC to Open or Close, follow these steps:

  1. From the Oracle Database menu, select Control, then Open/Close Pluggable Database.

  2. From the Open/Close PDB page, select a PDB from the list. The RAC instances are shown along with the PDB's current state on those instances.

  3. Once you select a PDB, a panel appears below the list to show the state of the PDBs on the different RAC instances. The open and close options apply to the PDBs on the RAC instance's panel. You can open or close a PDB on any number of available RAC instances.

  4. In the Confirmation dialog window, click Yes to complete the change. A Processing dialog window appears to show you the progress of your choice.

  5. Once state change completes, the Open/Close PDB page will update to show the new state of the PDB.