Oracle 12c – Manage Multitenant CDB and PDBs with EM Express
Starting with Oracle 12c, when a database is created, it does not have the database control console, as it used to in Oracle 10g and 11g. Even if you try to upgrade the database with the DB Console in place, you will have to remove it manually or the Upgrade Assistant will remove it. The replacement for the DBConsole is the new GUI EM Express tool. It is a trimmed down version of Enterprise Manager Cloud Control and thus has the advantage of the tight integration with EM control as well.
Manage Multitenant CDB and PDBs with EM Express
Configuring EM Express for CDB and PDBs
You will have to configure the EM Express for every container in 12c, whether it is a CDB or a PDB. Every container will have its own EM Express URL which can be used to manage the different aspects of the particular database. So the first step is to configure the EM Express for a CDB or PDB. The process is pretty much similar for either the CDB or the PDB.
• LOCAL_LISTENER parameter must be set to the name of Listener listening for your DB.
• Dispatcher parameter is properly set for TCP protocol for the target database.
$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 25-AUG-2013 12:51:06
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 25-AUG-2013 12:29:43
Uptime 0 days 0 hr. 21 min. 24 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/VST-12c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=VST-12c)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/cdb12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "cdb12c" has 2 instance(s).
Instance "cdb12c", status UNKNOWN, has 1 handler(s) for this service...
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "cdb12cXDB" has 1 instance(s).
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "pdb12c" has 1 instance(s).
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "pdb1_clone" has 1 instance(s).
Instance "cdb12c", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 25-AUG-2013 12:29:43
Uptime 0 days 0 hr. 21 min. 24 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/VST-12c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=VST-12c)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/cdb12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "cdb12c" has 2 instance(s).
Instance "cdb12c", status UNKNOWN, has 1 handler(s) for this service...
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "cdb12cXDB" has 1 instance(s).
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "pdb12c" has 1 instance(s).
Instance "cdb12c", status READY, has 1 handler(s) for this service...
Service "pdb1_clone" has 1 instance(s).
Instance "cdb12c", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
SQL> show parameter dispatcher;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=cdb12c XDB)
max_dispatchers integer
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=cdb12c XDB)
max_dispatchers integer
SQL> alter system set local_listener=LISTENER;
System altered.
System altered.
SQL> show parameter local;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER
log_archive_local_first boolean TRUE
parallel_force_local boolean FALSE
We are ready now to configure EM Express for CDB or PDB. First we will do it for our CDB which is CDB12c.
SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);
PL/SQL procedure successfully completed.
SQL> select dbms_xdb_config.gethttpsport from dual;
GETHTTPSPORT
------------
5500
https://<hostname>:5500/em/
SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
PL/SQL procedure successfully completed.
SQL> select dbms_xdb_config.gethttpsport from dual;
GETHTTPSPORT
------------
5501
The EM Express for PDB named PDB12c is now configured and can be accessed using URL below.
https://<hostname>:5501/em/
Using EM Express
You can use the individual URLs to access individual EM Express GUI for each container. The interface will be the same for every container. However options may be different depending on which container you are currently connected to. The EM Express for CDB will have more options and will show information about everything inside the CDB. The EM Express for the individual PDBs will only show information about that specific PDB database. Information about the CDB and other PDBs will not be available however.
The image below is that of the EM Express for a PDB.
The name in the top left hand corner clearly indicates the container you are currently connected to.
Granting EM Express access to normal users
You can grant any user access to EM Express using the two new roles.
• EM_EXPRESS_ALL will grant the full read/write access to EM data to any user. The role includes EM_EXPRESS_BASIC role.
SQL> create user foo identified by foo;
User created.
SQL> grant connect,resource,em_express_basic to foo;
Grant succeeded.
Comments
Post a Comment