Getting Started with Oracle Enterprise Manager Express


Options



Before You Begin

Purpose

This tutorial introduces you to Oracle Enterprise Manager Express, a Web-based interface for managing an Oracle database.

Time to Complete

Approximately 30 minutes

Background

Oracle Enterprise Manager Express enables you to perform administrative tasks such as managing user security and managing database memory and storage. You can also view performance and status information about your database. From Oracle Database 12c Release 1, the concept of multitenant environment was introduced. The multitenant architecture enables an Oracle database to function as a multitenant container database (CDB) that includes zero, one, or many customer-created pluggable databases (PDBs). A PDB is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. All Oracle databases before Oracle Database 12 were non-CDBs.

A CDB includes the following components:

  • Root

    The root, named CDB$ROOT, stores Oracle-supplied metadata and common users. An example of metadata is the source code for Oracle-supplied PL/SQL packages. A common user is a database user known in every container. A CDB has exactly one root.

  • Seed

    The seed, named PDB$SEED, is a template that you can use to create new PDBs. You cannot add objects to or modify objects in the seed. A CDB has exactly one seed.

  • PDBs

    A PDB appears to users and applications as if it were a non-CDB. For example, a PDB can contain the data and code required to support a specific application. A PDB is fully backward compatible with Oracle Database releases before Oracle Database 12c.

Each of these components is called a container. Therefore, the root is a container, the seed is a container, and each PDB is a container. Each container has a unique container ID and name within a CDB.

In this tutorial you will perform configuration steps that enable you to access Enterprise Manager Express for non-CDB, CDB and PDB and view the Database Home page for respective types of databases.

What Do You Need?

  • Oracle Database 12c Release 2

Prerequisites

Before starting this tutorial, you should have:

  • Installed Oracle Database 12c Release 2

Starting EM Express for non-CDB

Use the EM Express URL provided by DBCA when DBCA configured your non-CDB to start the EM Express. That URL includes the HTTPS port number for the non-CDB. If you do not know the HTTPS port number for the non-CDB, then follow the steps below:

  1. Open a terminal window, execute the oraenv command to set the environment variables and connect to the database orcl.

    $ . oraenv
    ORACLE_SID = [oracle] ? orcl
    The Oracle base has been set to /u01/app/oracle
    $ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 25 05:10:37 2016
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL>
  2. Check if the database is a non container database.

    SQL> select name, cdb, con_id from v$database;
    
    NAME	  CDB	  CON_ID
    --------- --- ----------
    ORCL	  NO	       0
  3. Check instance name.

    SQL> select instance_name, status, con_id from v$instance;
    
    INSTANCE_NAME	 STATUS 	  CON_ID
    ---------------- ------------ ----------
    orcl		 OPEN		       0
  4. Issue the SQL statement that returns the port that is configured for EM Express.

    SQL> select dbms_xdb_config.gethttpsport() from dual;
    
    DBMS_XDB_CONFIG.GETHTTPSPORT()
    ------------------------------
    			  5500
  5. If a port number is not returned by this statement, then you must manually configure an HTTPS port for this CDB, as described in "Configuring the HTTPs Port".

Starting EM Express for CDB

Use the EM Express URL provided by DBCA when DBCA configured your CDB to start the EM Express. That URL includes the HTTPS port number for the CDB. If you do not know the HTTPS port number for the CDB, then follow the steps below:

  1. Open a terminal window, execute the oraenv command to set the environment variables and connect to the multitenant container database orcl.

    $ . oraenv
    ORACLE_SID = [oracle] ? orcl
    The Oracle base has been set to /u01/app/oracle
    $ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 25 05:10:37 2016
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL>
  2. Check if the database is a multitenant container database.

    SQL> select name, cdb, con_id from v$database;
    
    NAME	  CDB	  CON_ID
    --------- --- ----------
    ORCL	  YES	       0
  3. Check the instance name.

    SQL> select instance_name, status, con_id from v$instance;
    
    INSTANCE_NAME	 STATUS 	  CON_ID
    ---------------- ------------ ----------
    orcl		 OPEN		       0
  4. Issue the SQL statement that returns the port that is configured for EM Express.

    SQL> select dbms_xdb_config.gethttpsport() from dual;
    
    DBMS_XDB_CONFIG.GETHTTPSPORT()
    ------------------------------
    			  5500
  5. Note: When connected to the root, EM Express displays data and enables actions that apply to the entire CDB.
  6. If a port number is not returned by this statement, then you must manually configure an HTTPS port for this CDB, as described in "Configuring the HTTPs Port".

Starting EM Express for PDB

Use the EM Express URL provided by DBCA when DBCA configured your PDB to start the EM Express. That URL includes the HTTPS port number for the PDB. If you do not know the HTTPS port number for the PDB, then follow the steps below:

  1. Display the PDBs.
  2. SQL> select con_id, name, open_mode from v$pdbs;
    
        CON_ID
    ----------
    NAME
    --------------------------------------------------------------------------------
    OPEN_MODE
    ----------
             2
    PDB$SEED
    READ ONLY
    
             3
    ORCLPDB
    READ WRITE
    
        CON_ID
    ----------
    NAME
    --------------------------------------------------------------------------------
    OPEN_MODE
    ----------
  3. Alter the session and set container as pdb (orclpdb in this case).
  4. SQL> ALTER SESSION SET CONTAINER=orclpdb;
    
    Session altered.
  5. Open the pluggable database (if not already open) and issue the SQL statement that returns the port that is configured for EM Express. 
  6. SQL> alter pluggable database orclpdb open;
    
    Pluggable database altered.

    SQL> SELECT dbms_xdb_config.gethttpsport() from dual; DBMS_XDB_CONFIG.GETHTTPSPORT() ------------------------------ 0

    Note: When connected to a PDB, EM Express displays data and enables actions that apply to the PDB only.

  7. If a port number is not returned by this statement, then you must manually configure an HTTPS port for this PDB, as described in "Configuring the HTTPS Port".

Configuring the HTTPS Port

You can access Enterprise Manager Database Express using the URL that was displayed during installation. In case you want to use a different port or manually configure an HTTPS port, you need to configure the port using the dynamic protocol registration method. After the HTTPS port is configured, you use it to access Enterprise Manager Express.

Configuring the HTTPS Port for non-CDB

The default port used is 5500. In this case, you will configure Enterprise Manager Database Express to run on port 5501.
  1. Open a terminal window and execute the oraenv command to set the environment variables.

    $ . oraenv
    ORACLE_SID = [oracle] ? orcl
    The Oracle base has been set to /u01/app/oracle
  2. Verify that the listener is started by executing the lsnrctl status command.

    $ lsnrctl status
    
    LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 25-JUL-2016 05:32:53
    
    Copyright (c) 1991, 2016, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.example.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
    Start Date                25-JUL-2016 05:30:14
    Uptime                    0 days 0 hr. 2 min. 39 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/host01/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.example.com)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "orcl.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
  3. Log in to SQL*Plus as the SYSDBA user and verify that the DISPATCHERS parameter in the initialization parameter file includes the PROTOCOL=TCP attribute.

    $ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 25 06:47:49 2016
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> show parameter dispatchers
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    dispatchers                          string      (PROTOCOL=TCP) (SERVICE=orclXD
                                                     B)
    max_dispatchers                      integer
  4. Execute the DBMS_XDB_CONFIG.setHTTPSPort procedure to set the HTTPS port for Enterprise Manager Express.

    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
    
    PL/SQL procedure successfully completed.

Configuring the HTTPS Port for CDB and PDB

The default port used is 5500. In this case you will configure Enterprise Manager Database Express for CDB to run on port 5501 and for PDB to run on 5502.
  1. Open a terminal window and execute the oraenv command to set the environment variables, if not set already.

    $ . oraenv
    ORACLE_SID = [oracle] ? orcl
    The Oracle base has been set to /u01/app/oracle
  2. Verify that the listener is started by executing the lsnrctl status command.

    $ lsnrctl status
    
    LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 25-JUL-2016 06:49:16
    
    Copyright (c) 1991, 2016, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.example.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
    Start Date                25-JUL-2016 05:30:14
    Uptime                    0 days 1 hr. 19 min. 2 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/host01/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.example.com)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)(PORT=5501))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "3820ba9b05f040eae053f7dcf00a3d56.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orcl.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclpdb.example.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
  3. Log in to SQL*Plus as the SYSDBA user and verify that the DISPATCHERS parameter in the initialization parameter file includes the PROTOCOL=TCP attribute.

    $ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 25 05:36:34 2016
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> show parameter dispatchers
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    dispatchers                          string      (PROTOCOL=TCP) (SERVICE=orclXD
                                                     B)
    max_dispatchers                      integer
  4. Execute the DBMS_XDB_CONFIG.SETHTTPSPORT procedure to set the HTTPS port for EM Express for a CDB.

    SQL> alter session set container=CDB$ROOT;
    
    Session altered.
    
    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
    
    PL/SQL procedure successfully completed.
  5. Execute the DBMS_XDB_CONFIG.SETHTTPSPORT procedure to set the HTTPS port for EM Express for a PDB.

    SQL> alter session set container=orclpdb;
    
    Session altered.
    
    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);
    
    PL/SQL procedure successfully completed.

Accessing the Database Home Page

The Database Home page is the main database management page in Enterprise Manager Database Express.

Accessing non-CDB homepage

  1. In your Web browser, enter the URL to access Enterprise Manager: https://database-hostname:portnumber/em.

    The address bar of the browser
    Description of this image

    Note: You will receive a Secure Connection Failed message on first access after installation and you need to add a security exception.

  2. Log in to Enterprise Manager Database Express with an authorized user account such as SYSTEM. Enter the username and password in the appropriate fields. Click Login.

    The login page of Enterprise Manager
    Description of this image
  3. The Database Home page is displayed. Continue with other tutorials in the series or log out of Enterprise Manager Database Express.

Accessing CDB and PDB Home Page

Accessing CDB Home Page

  1. In your Web browser enter the URL to access Enterprise Manager: https://database-hostname:portnumber/em.

    The address bar of the browser
    Description of this image
    Note: You will receive a Secure Connection Failed message on first access after installation and you need to add a security exception.
  2. Log in to Enterprise Manager Database Express with an authorized user account such as SYSTEM. Enter the username and password in the appropriate fields. Click Login.

    The Enterprise Manager login page
    Description of this image
  3. The Database Home page is displayed. Continue with other tutorials in the series or log out of Enterprise Manager Database Express.

Accessing PDB Home page

To Manage your PDB, you can access EM Express. In this case, your PDB is orclpdb. Perform the following steps:

  1. In your Web browser enter the URL to access Enterprise Manager: https://database-hostname:portnumber/em.

    The address bar of the browser
    Description of this image

    Note: You will receive a Secure Connection Failed message on first access after installation and you need to add a security exception.

  2. Log in to Enterprise Manager Database Express with an authorized user account such as SYSTEM. Enter the username and password in the appropriate fields. Click Login.

    The Enterprise Manager login page
    Description of this image
  3. The Database Home page is displayed.

Want to Learn More?