Oracle 12.2 – how to get access to Enterprise Manager 12c Database Express

Today I have built in my OL 7.3 VM two container databases to verify the new feature in the Enterprise Manager 12c Database Express login screen where I can go direct into a container. The benefit is that I don’t have to set a separate port for each pluggable database anymore.

The DBCA has created me a fresh container database called ZH38 and a pluggable database ZHPDB01. I have enable the checkbox to configure EM 12c Database Express for Port 5501. After the database creation was finished, I was able to see the login screen, but the login was not possible. I got an XDB login prompt. SYS, SYSTEM and other users where I tried were not accepted.

I found  the solution in the Database 2 Day DBA Guide – http://docs.oracle.com/database/122/ADMQS/getting-started-with-database-administration.htm#ADMQS003 :

SQL> exec dbms_xdb_config.setglobalportenabled(TRUE);

PL/SQL procedure successfully completed.

After the execution of this command in the CDB$ROOT container, logins into EM 12c Database Express of the CDB$ROOT and the pluggable database ZHPDB01 were possible. No restart of the container database was required. If once set, it works for all existing and new created pluggable databases, the PDB$SEED included.

If you want to disable this access method to a specific pluggable database, execute the command above with the FALSE flag.

How can you find out if the parameter is set? Thanks to my Trivadis collegue Philipp Salvisberg / https://www.salvis.com/blog who has provided me this PL/SQL code:

SQL> WITH
  2  FUNCTION b2vc (in_bool_expr VARCHAR2) RETURN VARCHAR2 IS
  3     l_bool  BOOLEAN;
  4     l_plsql VARCHAR2(32767);
  5     l_ret   VARCHAR2(5);
  6  BEGIN
  7     l_plsql := 'BEGIN :l_bool := ' || in_bool_expr || '; END;';
  8     EXECUTE IMMEDIATE l_plsql USING OUT l_bool;
  9     IF l_bool IS NOT NULL THEN
 10        IF l_bool THEN
 11           l_ret := 'TRUE';
 12        ELSE
 13           l_ret := 'FALSE';
 14        END IF;
 15     END IF;
 16     RETURN l_ret;
 17  END b2vc;
 18  SELECT b2vc('DBMS_XDB_CONFIG.ISGLOBALPORTENABLED') FROM dual;
 19  /

B2VC('DBMS_XDB_CONFIG.ISGLOBALPORTENABLED')
--------------------------------------------------------------------------------
TRUE

 

Summary: Do you have any problems with the new release? First read the new documentation.