©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

ORACLE ENTERPRISE MANAGER DATABASE EXPRESS CONFIGURATION

The database express is a browser based database management tool. The tool assigned to an HTTPS port becomes available when the database starts up. As of 12c, the old emctl utlity used to start/stop and configure the database control web server is now gone. The database express web server is started as a service within the database listener. Configurations are now being done at the database level.


How To Check For The Database Express HTTPS Port

In case you have forgotten what https port was configured for your database, execute the following SQL:

 

For non-CDB database:

select dbms_xdb_config.gethttpsport() from dual;


For CDB database:

alter session set container=CDB$ROOT;

select dbms_xdb_config.gethttpsport() from dual;


For PDB database:

alter session set container=PDBname;

select dbms_xdb_config.gethttpsport() from dual;



How To Change The Database Express HTTPS Port

This is in the assumption that you had previously chosen to configure the EM database express either manually or using the dbca.

 

For non-CDB database:

An example to set the https port to 5500.


SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);


For CDB database:

An example to set the https port to 5501.


SQL> alter session set container=CDB$ROOT;

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);


For PDB database:

An example to set the https port to 5502.


SQL> alter session set container=PDB1;

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);



How To Manually Create An EM Database Express For A Database

You may have previously omitted the option for the database express when you created the database. You still can configure database express manually using the following steps.


1. Configure local listener in your init.ora if your listener port is not the default 1521.


If you haven’t done so, create a TNS alias for your listener in your $ORACLE_HOME/network/admin/tnsnames.ora.

Example:

LISTENER_OMRDB =

  (ADDRESS = (PROTOCOL = TCP)(HOST = s111oem)(PORT = 1601))


Configure a local listener in your init.ora

local_listener=LISTENER_OMRDB


2. Create a TCP dispatcher for your xdb.

Syntax:

dispatchers="(PROTOCOL=TCP)(SERVICE=<sid>XDB)"


Example:

dispatchers="(PROTOCOL=TCP)(SERVICE=OMRDBXDB)"


3. Restart the database for changes to take effect.


4. Configure the HTTPS port.

Use the PL/SQL procedure DBMS_XDB_CONFIG.SETHTTPSPORT to set the HTTPS port for EM Express for the database to a port that is not in use. This will update the HTTPS port in the xdbconfig.xml file in the Oracle XML DB Repository. You must connect as SYS / AS SYSDBA to run the procedure.

See my previous instructions on reconfiguring HTTPS port for more details - read more.


5. Access the database express for non-CDB, CDB, and PDB through the following URL syntax:


https://database-hostname:portnumber/em/


Example:


https://s111oem:5500/em



How To Disable Oracle Enterprise Manager Database Express


1. Check if the database express is running at the listener.


oraem@s111oem:~/.env$ lsnrctl status OMRDB


LSNRCTL for Solaris: Version 12.1.0.1.0 - Production on 13-SEP-2014 09:27:38


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=s111oem)(PORT=1601)))

STATUS of the LISTENER

------------------------

Alias                     OMRDB

Version                   TNSLSNR for Solaris: Version 12.1.0.1.0 - Production

Start Date                13-SEP-2014 07:13:01

Uptime                    0 days 2 hr. 14 min. 37 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /oem/app/oraemdb/product/12.1.0.1/db/network/admin/listener.ora

Listener Log File         /oem/app/oraemdb/diag/tnslsnr/s111oem/omrdb/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=s111oem)(PORT=1601)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1601)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=s111oem)(PORT=5500))(Security=(my_wallet_directory=/oem/app/oraemdb/product/12.1.0.1/db/admin/OMRDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "OMRDB.local.net" has 1 instance(s).

  Instance "OMRDB", status READY, has 1 handler(s) for this service...

Service "OMRDBXDB.local.net" has 1 instance(s).

  Instance "OMRDB", status READY, has 0 handler(s) for this service...

The command completed successfully

oraem@s111oem:~/.env$


2. Reset the parameter dispatchers of your spfile.


SQL> show parameter dispatcher


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dispatchers                          string      (PROTOCOL=TCP) (SERVICE=OMRDBX

                                                 DB)

max_dispatchers                      integer

SQL>


SQL> alter system reset dispatchers scope=spfile sid='*';


System altered.


SQL>


SQL> show parameter dispatcher


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dispatchers                          string

max_dispatchers                      integer

SQL>



3. Restart the database and check the status of your listener.


SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.


SQL> startup

ORACLE instance started.


Total System Global Area 3206836224 bytes

Fixed Size                  2366216 bytes

Variable Size             704644344 bytes

Database Buffers         2483027968 bytes

Redo Buffers               16797696 bytes

Database mounted.

Database opened.

SQL>

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

oraem@s111oem:~/.env$ lsnrctl status OMRDB


LSNRCTL for Solaris: Version 12.1.0.1.0 - Production on 13-SEP-2014 09:34:48


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=s111oem)(PORT=1601)))

STATUS of the LISTENER

------------------------

Alias                     OMRDB

Version                   TNSLSNR for Solaris: Version 12.1.0.1.0 - Production

Start Date                13-SEP-2014 07:13:01

Uptime                    0 days 2 hr. 21 min. 47 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /oem/app/oraemdb/product/12.1.0.1/db/network/admin/listener.ora

Listener Log File         /oem/app/oraemdb/diag/tnslsnr/s111oem/omrdb/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=s111oem)(PORT=1601)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1601)))

Services Summary...

Service "OMRDB.local.net" has 1 instance(s).

  Instance "OMRDB", status READY, has 1 handler(s) for this service...

The command completed successfully

oraem@s111oem:~/.env$


oraem@s111oem:~/scripts$