How to configure EM Express for a single PDB ?

What is Em Express ?

EM Express is a new addition to the monitoring tools family and it replaces EM Database control which was part of the database until release 11g. EM  Express is an out of the box web based management tool that runs embedded as a XDB servlet inside the database and is configured automatically with the database installation process (e.g. using dbca). There are no additional installation steps. EM Express has a very low database footprint and consumes no system resources when not used. It can work both on single instance and RAC environments and has a familiar look and feel of EM12c Cloud Control. In a CDB installation EM Express is enabled by default for the root container. For individual PDBs , a separate EM Express port needs to be configured. 

Why do we need EM Express for individual PDBs ?

EM Express will be useful to application DBAs a.k.a PDBAs for monitoring and managing performance within their assigned PDBs. Apart from this obvious use in a Test/Dev setup with no sensitive data Oracle Multitenant allows a developer to have complete access to the data dictionary within a PDB. The developer now enjoys complete control within the realms of a PDB. This has remained elusive over the years and has been controlled by the DBA team. Thus within an Oracle Multitenant setup developers will gain a lot of autonomy and they can have access to their performance data catalog, tune queries and make changes within their PDBs using EM Express without even bothering the DBA who is now focusing more at system level performance and operational tasks.

How can we configure a XDB port ?

There is an out of the box table xdb$cdbports owned by the XDB user. We will leverage this table to determine the list of assigned ports for every PDB. Let us login to the CDB as the SYSDBA (e.g. SYS user) and run the following query. By the way the default port assigned to the root container is 5500.

List of ports assigned to PDBs

SQL> l
  1  select c.name,c.open_mode,e.port
  2  from v$pdbs c, xdb.xdb$cdbports e
  3* where c.con_id = e.pdb (+)
SQL> /

NAME                           OPEN_MODE    PORT
------------------------------ ---------- ----------
ORDERS                        READ WRITE    5501
SPARK                         MOUNTED       5505
JPM                           READ WRITE   
NONCDB                        READ WRITE
PDB_000                       READ WRITE
PDB$SEED                      READ ONLY

From the listing above we can see only 2 out of the 6 PDBs in this CDB has a port assigned. Let us assign a port to the JPM pluggable database. Let us first change container to JPM and find out the XDB port which should not return any value.

SQL> alter session set container = JPM;

Session altered.

Now let us find out the XDB port.

SQL> select dbms_xdb_config.gethttpsport() from dual;

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


We can set the XDB port to say a new port 5504 using the following procedure. 


SQL> exec dbms_xdb_config.sethttpsport(5504); 

PL/SQL procedure successfully completed.

Let us connect back to the root container and re run the same listing we had done earlier.


SQL> alter session set container = cdb$root;

Session altered.

SQL> select c.name,c.open_mode,e.port
  2   from v$pdbs c, xdb.xdb$cdbports e
  3  where c.con_id = e.pdb (+);

NAME                           OPEN_MODE    PORT
------------------------------ ---------- ----------
ORDERS                         READ WRITE    5501
SPARK                          MOUNTED       5505
JPM                            READ WRITE    5504
NONCDB                         READ WRITE
PDB_000                        READ WRITE
PDB$SEED                       READ ONLY

As we can see here the pluggable database JPM has the XDB port 5504 configured. Now we should also verify whether this port has registered with the listener.

$ lsnrctl status | grep -i 5504
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5504))(Security=(my_wallet_directory=/scratch/dechatt/app/product/12.1.0/dbhome_1/admin/db12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Once we have verified the listener registration all we need to do is to log into EM Express using a common user or a local user that has the required EM Express roles (EM_EXPRESS_ALL or EM_EXPRESS_BASIC). The URL in this case will be https://localhost:5504/em.

Once logged inside EM Express we can see the home page specific to this pluggable database.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blog is maintained by the Database Product Management team.

Search

Categories
Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today