How to connect to a PDB using Oracle EM Express

This post is more like a reminder to myself on how to do this (I have a bad memory…)

By default EM Express is configured for a non-CDB or for a CDB depending on what you selected during a 12C installation and the default URL is https://hostname:5500/em

You can confirm this by looking at the database name (ora12cr1) that is displayed on the top left corner.

em_exp_cdb

To be able to connect to a PDB using EM Express, we need to configure another port using the DBMS_XDB_CONFIG.SETHTTPSPORT() procedure. To complete this setup, first we have to connect to the PDB and make sure it’s open and then we have to configure the https port for the PDB.

C:\Users\gbalda>sqlplus

SQL*Plus: Release 12.1.0.1.0 Production on Thu Aug 1 21:14:17 2013

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

Enter user-name: sys as sysdba
Enter password:
Last Successful login time: Thu Aug 01 2013 21:08:44 -05:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show user
USER is "SYS"
SQL> alter session set container = ora12cpdb1
 2 ;

Session altered.

SQL> select name, open_mode from v$pdbs;

NAME OPEN_MODE
------------------------------ ----------
ORA12CPDB1 MOUNTED

SQL> alter pluggable database open read write;

Pluggable database altered.

SQL> select name, open_mode from v$pdbs;

NAME OPEN_MODE
------------------------------ ----------
ORA12CPDB1 READ WRITE
SQL> select dbms_xdb_config.gethttpsport from dual;

GETHTTPSPORT
------------
SQL> exec dbms_xdb_config.sethttpsport(5501);

PL/SQL procedure successfully completed.

Now the URL for the PDB is going to be https://hostname:5501/em and you can confirm it’s the PDB once you connect and look at the name displayed (ora12cpdb1) on the top left corner.

em_exp_pdb

The same process can be repeated for other PDBs on your system.

About these ads

3 Comments on “How to connect to a PDB using Oracle EM Express”

  1. […] Much like having to activate a PDB before being able to connect to it, EM GUI per PDB has to activated independently.  I found all the information I needed in this great post.    […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.