EM Express was earlier called DB console. It lightweight and have minimal overhead on the database server. It uses internal infrastructure components such as XDB and SQL*Net. It does not require any separate middle-tier components.

In this article we will see how to enable EM express for two databases on same server.

Server - ggsource.localdomain (ip - 192.168.189.131)
Database – Germany, gclone1

Basically three settings need to be done

  1. Unique https port for every database
  2. ORACLE_SIDXDB service should be registered with listener
  3. Setting dispatchers parameter

GCLONE1 database setting

ensure dispatcher parameter has below setting. Here SERVICE name value is ORACLE_SIDXDB

SYS@ gclone1>ALTER SYSTEM SET DISPATCHERS = '(PROTOCOL=TCP) (SERVICE=gclone1XDB)';

System altered.
SYS@ gclone1>sho parameter dispa

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string      (PROTOCOL=TCP) (SERVICE=gclone
                                                 1XDB)
max_dispatchers                      integer
SYS@ gclone1>exec dbms_xdb_config.sethttpsport (5502);

PL/SQL procedure successfully completed.



SYS@ gclone1>select dbms_xdb_config.gethttpsport () from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5502

Make sure gclone1XDB service need to be registered inside listener.

SYS@ gclone1>!lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-APR-2020 11:41:46

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ggsource.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                12-APR-2020 10:36:05
Uptime                    1 days 1 hr. 5 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ggsource/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ggsource.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ggsource.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/germany/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "germany" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germanyXDB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germany_DGB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
The command completed successfully

As you can see right now it is not registere so we need to do this by rebooting the database and listener.

SYS@ gclone1>shu immediate
startup
!lsnrctl stop
!lsnrctl start
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@ gclone1>

ORACLE instance started.

Total System Global Area  536870912 bytes
Fixed Size                  2926472 bytes
Variable Size             268437624 bytes
Database Buffers          260046848 bytes
Redo Buffers                5459968 bytes
Database mounted.





Database opened.


SYS@ gclone1>!lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-APR-2020 12:20:28

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ggsource.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                13-APR-2020 12:18:53
Uptime                    0 days 0 hr. 1 min. 34 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ggsource/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ggsource.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ggsource.localdomain)(PORT=5502))(Security=(my_wallet_directory=/u01/app/oracle/admin/gclone1/xdb_wallet))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ggsource.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/germany/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "gclone1" has 1 instance(s).
  Instance "gclone1", status READY, has 1 handler(s) for this service...
Service "gclone1XDB" has 1 instance(s).
  Instance "gclone1", status READY, has 1 handler(s) for this service...
Service "germany" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germanyXDB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germany_DGB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
The command completed successfully

Now you can use this URL to access EM DB express console for gclone1

https://192.168.189.131:5502/em

Germany database setting

Now we have one more database on this server. All above steps will be same except that you need to choose a different port for https. In this case I have used port 5500. After changes settings will look like this

SYS@ germany>show parameter dispatchers

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string      (PROTOCOL=TCP) (SERVICE=german
                                                 yXDB)
max_dispatchers                      integer
SYS@ germany>select dbms_xdb_config.gethttpsport () from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500
[oracle@ggsource admin]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-APR-2020 12:43:11

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ggsource.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                13-APR-2020 12:18:53
Uptime                    0 days 0 hr. 24 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ggsource/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ggsource.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ggsource.localdomain)(PORT=5502))(Security=(my_wallet_directory=/u01/app/oracle/admin/gclone1/xdb_wallet))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ggsource.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/germany/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "gclone1" has 1 instance(s).
  Instance "gclone1", status READY, has 1 handler(s) for this service...
Service "gclone1XDB" has 1 instance(s).
  Instance "gclone1", status READY, has 1 handler(s) for this service...
Service "germany" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germanyXDB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
Service "germany_DGB" has 1 instance(s).
  Instance "germany", status READY, has 1 handler(s) for this service...
The command completed successfully

We will use this url – https://192.168.189.131:5500/em/