Creating an Application PDB

You create an application PDB by running the CREATE PLUGGABLE DATABASE statement with an application root as the current container.

You can create application PDBs using the same SQL statements that you use to create PDBs in the CDB root. The newly created PDB is an application PDB when the CREATE PLUGGABLE DATABASE statement is run in an application root. The statement must be run in an application root and has an explicit dependency on the application database defined in that application root.

Before creating an application PDB, complete the prerequisites described in "General Prerequisites for PDB Creation". You must also complete the prerequisites for the specific type of PDB you are creating. For example, if you are cloning a PDB, then you must meet the prerequisites PDB cloning.
  1. In SQL*Plus, ensure that the current container is the application root.
  2. Run a CREATE PLUGGABLE DATABASE statement.
    After you create the application PDB, it is in mounted mode, and its status is NEW. You can view the open mode of an application PDB by querying the OPEN_MODE column in the V$PDBS view. You can view the status of an application PDB by querying the STATUS column of the CDB_PDBS or DBA_PDBS view.
    A new default service is created for the application PDB. The service has the same name as the application PDB and can be used to access the application PDB. Oracle Net Services must be configured properly for clients to access this service.
  3. Open the new application PDB in read/write mode.
  4. You must open the new application PDB in read/write mode for Oracle Database to complete the integration of the new application PDB into the application container. An error is returned if you attempt to open the application PDB in read-only mode. After the application PDB is opened in read/write mode, its status is NORMAL.
  5. Switch container to the application PDB.
  6. Use an ALTER PLUGGABLE DATABASE statement with the SYNC clause to synchronize the application PDB.
    Synchronizing with the application PDB instantiates one or more of the application root’s applications in the application PDB.
  7. Close the application PDB, and then open it in open read-only mode.
  8. Back up the application PDB.
    An application PDB cannot be recovered unless it is backed up.

    Note:

    • If an error is returned during application PDB creation, then the application PDB being created might be in an UNUSABLE state. You can check an application PDB’s state by querying the CDB_PDBS or DBA_PDBS view, and you can learn more about application PDB creation errors by checking the alert log. An unusable application PDB can only be dropped.

    • When an application in the application root is upgraded or patched in the application root, the application PDB must synchronize with the application root to include the changes.