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.
- In SQL*Plus, ensure that the current container is the application root.
- Run a
CREATE PLUGGABLE DATABASEstatement.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_MODEcolumn in the
V$PDBSview. You can view the status of an application PDB by querying the
STATUScolumn of the
DBA_PDBSview.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.
- Open the new application PDB in read/write mode.
- 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
- Switch container to the application PDB.
- Use an
ALTER PLUGGABLE DATABASEstatement with the
SYNCclause to synchronize the application PDB.Synchronizing with the application PDB instantiates one or more of the application root’s applications in the application PDB.
- Close the application PDB, and then open it in open read-only mode.
- Back up the application PDB.An application PDB cannot be recovered unless it is backed up.
If an error is returned during application PDB creation, then the application PDB being created might be in an
UNUSABLEstate. You can check an application PDB’s state by querying the
DBA_PDBSview, 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.