Tag Archives: Configure OEM Express 12c

Configure OEM Express 12c

Enable Oracle Enterprise Manager Express 12c

Goal: Configure OEM Express for both CDB (CDB2) and PDB (PDB4)

0. Environment
1. Introduction
2. Verify OEM Express already configured or not
3. Verify OEM Express already configured or not for PDB4
4. Configure OEM Express for CDB (HTTPs & HTTP)
5. Login to EM Express for CDB2
6. Configure OEM Express for PDB4
7. Login to EM Express for PDB4


0. Environment

Version		: 12.2.0.1.0
OS    	 	: Red Hat Enterprise Linux Server release 6.8
IP     		: 192.168.2.101
CDB NAME	: CDB2
PDB NAME	: PDB4


1. Introduction

Oracle Enterprise Manager Express is a Web-based interface for managing an Oracle database 12c. 
Used to perform basic administrative tasks such as 

- Managing users
- Managing memory
- Managing storage
- Managing database initialization parameters
- Monitor performance
- View SQL Tuning Advisor information
- Verify status information container database and pluggable databases.


2. Verify OEM Express already configured or not for CDB2

If returned port number is 0, it means that EM Express is not configured for that particular container.

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

SQL> select DBMS_XDB_CONFIG.GETHTTPPORT() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
                            0  <-----

SQL> select DBMS_XDB_CONFIG.GETHTTPSPORT() from dual;

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

SQL> 


3. Verify OEM Express already configured or not for PDB4

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL>
SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           MOUNTED
         4 PDB2                           MOUNTED
         5 PDB3                           MOUNTED
         6 PDB4                           READ WRITE NO <-----
SQL>
SQL> alter session set container=PDB4;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
PDB4  <------
SQL>
SQL> select DBMS_XDB_CONFIG.GETHTTPPORT() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
                            0  <-----

SQL> select DBMS_XDB_CONFIG.GETHTTPSPORT() from dual;

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

SQL>


4. Configure OEM Express for CDB (HTTPs & HTTP)

We are configuring EM Express for PDB4 to run on ports: HTTPs 5500 and HTTP 5510

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name, cdb, con_id from v$database;

NAME      CDB     CON_ID
--------- --- ----------
CDB2      YES          0

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> select instance_name, status, con_id from v$instance;

INSTANCE_NAME    STATUS           CON_ID
---------------- ------------ ----------
CDB2             OPEN                  0

SQL> show parameter dispatchers

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------------------------------
dispatchers                          string      (PROTOCOL=TCP) (SERVICE=CDB2XDB)
max_dispatchers                      integer

SQL> prompt Execute the DBMS_XDB.setHTTPSPort procedure to set the HTTPS port 5500
Execute the DBMS_XDB.setHTTPSPort procedure to set the HTTPS port 5500

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);

PL/SQL procedure successfully completed.

SQL>

SQL> prompt Execute the DBMS_XDB.setHTTPPort procedure to set the HTTP port 5510 for EM Express
Execute the DBMS_XDB.setHTTPPort procedure to set the HTTP port 5510 for EM Express

SQL> exec DBMS_XDB_CONFIG.SETHTTPPORT(5510);

PL/SQL procedure successfully completed.

SQL>

SQL> select DBMS_XDB_CONFIG.GETHTTPPORT() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
                         5510

SQL> select DBMS_XDB_CONFIG.GETHTTPSPORT() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500

SQL>


5. Login to EM Express for CDB

https://192.168.2.101:5500/em 
http://192.168.2.101:5510/em




6. Configure OEM Express for PDB4

We are configuring EM Express for PDB4 to run on ports: HTTPs 5501 and HTTP 5511

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           MOUNTED
         4 PDB2                           MOUNTED
         5 PDB3                           MOUNTED
         6 PDB4                           READ WRITE NO <-----
SQL>
SQL> alter session set container=PDB4;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
PDB4
SQL> prompt execute the DBMS_XDB.setHTTPSPort procedure to set the HTTPS port 5501
execute the DBMS_XDB.setHTTPSPort procedure to set the HTTPS port 5501
SQL>
SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);

PL/SQL procedure successfully completed.

SQL>
SQL> prompt execute DBMS_XDB.setHTTPPort procedure to set the HTTP port 5511 for EM Express
execute DBMS_XDB.setHTTPPort procedure to set the HTTP port 5511 for EM Express
SQL>
SQL> exec DBMS_XDB_CONFIG.SETHTTPPORT(5511);

PL/SQL procedure successfully completed.

SQL>
SQL> select DBMS_XDB_CONFIG.GETHTTPPORT() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
                         5511

SQL> select DBMS_XDB_CONFIG.GETHTTPSPORT() from dual;

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

SQL>


7. Login to EM Express for PDB4

https://192.168.2.101:5501/em 
http://192.168.2.101:5511/em



Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.