Skip to content

How to Start EM Express for PDB

  • by

EM Express for PDB

I assumed that you have enabled Enterprise Manager Express (EM Express) before reading this post.

During database creation, DBCA enables Enterprise Manager Express (EM Express) for being created CDB, not for PDB globally by default. We can either:

  1. Share this global port to all PDB, or
  2. Enable a dedicated port for a specific PDB

Solutions

1. Enable Global Port

To share the port (i.e. 5500) for all PDB globally, we can do it like this.

[oracle@ora19c1 ~]$ sqlplus / as sysdba
...
SQL> exec dbms_xdb_config.setglobalportenabled(TRUE);

PL/SQL procedure successfully completed.

Then we go for EM Express.

https://ora19c1.example.com:5500/em

Carefully enter the PDB name in the field of "Container Name".

EM Express Global Port for all PDBs

EM Express Global Port for all PDBs

2. Enable a Separate Port

We can also assign a dedicated port for each PDB.

A. Open the PDB

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB1                       MOUNTED
SQL> alter pluggable database ORCLPDB1 open;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB1                       READ WRITE NO

B. Set Current Container

SQL> alter session set container=ORCLPDB1;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
ORCLPDB1

C. Check Current Port of EM Express

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                             0

Obviously, there's none, we have to set one for the PDB.

D. Set EM Express Port

SQL> exec dbms_xdb_config.sethttpsport(5501);

PL/SQL procedure successfully completed.

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5501

1 row selected.

Now go to the following URL for signing on EM express of the PDB. In this case, I go for:

https://ora19c1.example.com:5501/em

The new interface of EM express 19c may not have as many features as used to be, but you can revert it back to flash-based EM express.

Leave a Reply

Your email address will not be published.