quoted from:
Starting EM Express for non-CDB
-
Check if the database is a non container database.
SQL> select name, cdb, con_id from v$database; NAME CDB CON_ID --------- --- ---------- ORCL NO 0
-
Check instance name.
SQL> select instance_name, status, con_id from v$instance; INSTANCE_NAME STATUS CON_ID ---------------- ------------ ---------- orcl OPEN 0
-
Issue the SQL statement that returns the port that is configured for EM Express.
SQL> select dbms_xdb_config.gethttpsport() from dual; DBMS_XDB_CONFIG.GETHTTPSPORT() ------------------------------ 5500
-
If a port number is not returned by this statement, then you must manually configure an HTTPS port for this CDB, as described in "Configuring the HTTPs Port".
Starting EM Express for CDB
-
Check if the database is a multitenant container database.
SQL> select name, cdb, con_id from v$database; NAME CDB CON_ID --------- --- ---------- ORCL YES 0
-
Check the instance name.
SQL> select instance_name, status, con_id from v$instance; INSTANCE_NAME STATUS CON_ID ---------------- ------------ ---------- orcl OPEN 0
-
Issue the SQL statement that returns the port that is configured for EM Express.
SQL> select dbms_xdb_config.gethttpsport() from dual; DBMS_XDB_CONFIG.GETHTTPSPORT() ------------------------------ 5500
- Note: When connected to the root, EM Express displays data and enables actions that apply to the entire CDB.
-
If a port number is not returned by this statement, then you must manually configure an HTTPS port for this CDB, as described in "Configuring the HTTPs Port".
Starting EM Express for PDB
Use the EM Express URL provided by DBCA when DBCA configured your PDB to start the EM Express. That URL includes the HTTPS port number for the PDB. If you do not know the HTTPS port number for the PDB, then follow the steps below:
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID
----------
NAME
--------------------------------------------------------------------------------
OPEN_MODE
----------
2
PDB$SEED
READ ONLY
3
ORCLPDB
READ WRITE
CON_ID
----------
NAME
--------------------------------------------------------------------------------
OPEN_MODE
----------
SQL> ALTER SESSION SET CONTAINER=orclpdb;
Session altered.
SQL> alter pluggable database orclpdb open;
Pluggable database altered.
SQL> SELECT dbms_xdb_config.gethttpsport() from dual;
DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
0
Note: When connected to a PDB, EM Express displays data and enables actions that apply to the PDB only.
- Display the PDBs.
- Alter the session and set container as pdb (orclpdb in this case).
- Open the pluggable database (if not already open) and issue the SQL statement that returns the port that is configured for EM Express.
- If a port number is not returned by this statement, then you must manually configure an HTTPS port for this PDB, as described in "Configuring the HTTPS Port".