The scenarios in this section describe when Application Express is not installed in the root container,
CDB$ROOT, by explicitly removing it as described in Uninstalling Application Express 5.1 from a CDB.
In such cases, you can optionally install a local Application Express into each PDB independently. If Application Express is installed into a PDB it is considered to be installed locally and has no metadata linked objects. There are multiple scenarios related to where the database being plugged in originated from and how Application Express was configured in the originating database.
See Also:"Uninstalling Application Express 5.1 from a CDB."
Plug-in a Non-CDB with Application Express.
If you are upgrading from a previous Oracle Database release then you need to upgrade to Oracle Database 12c non-CDB (or standalone database) and then plug the database into your CDB. Alternatively you may have configured a non-CDB Oracle Database 12c that you now want to plug into a CDB. In both cases, the originating database had Application Express installed and was not formerly a PDB.
As described in the Oracle Database Installation Guide for your operating system, when plugging in a standalone database you need to run the
$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql script. This script creates the necessary metadata linked objects (instead of local objects) and recompiles the database objects for all common database options. However, because Application Express has been removed from the root container, the script will not create any metadata links for any of the Application Express objects. The script does not change the Application Express installation from the originating database and no additional steps are needed other than configuring the Web listener depending on the type of Web listener you are using.
Plug-in a PDB with Application Express from another CDB.
If you are copying or moving a PDB from an existing Oracle Database 12c where the originating CDB had Application Express installed in the root container, then an error is raised whenever you try and open the PDB. The error is due to the originating PDB included metadata links to objects in the originating root container which cannot be recompiled because the target root container does not include Application Express. You will not be able to open the PDB unless you remove Application Express from the PDB or if Application Express is already installed in the target root container. Oracle does not support installing Application Express in the root container if it contains PDBs with locally installed Application Express.
Plug-in a PDB with local Application Express from another CDB.
If you are copying or moving a PDB from an existing Oracle Database 12c where the originating PDB had a local Application Express installed (not in the CDB) then you do not need to perform any additional steps, other than configuring the Web listener in the PDB depending on the type of Web listener you are using.
Assuming Application Express release 5.0 is installed, the
APEX_050000 schema within the PDB being plugged in already has all of the Application Express objects defined locally and no metadata links.
Plug-in a Non-CDB or PDB if Application Express is not installed.
If you are plugging in a non-CDB, or copying or moving a PDB from another CDB, where Application Express was not installed in the originating database or PDB then you do not need to perform any additional steps. There will be no Application Express engine schema, such as
APEX_050100, within the PDB, and the PDB can be started without error.