Oracle Enterprise Manager Database Express 12C

Enterprise Manager Database Express (EM Express) 12c..(OEL6.5)

Introduction

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. In this tutorial you will perform configuration steps to enable you to access Enterprise Manager Express and view the Database Home page.

With the new release of Oracle Database 12c, Oracle has removed the old Database Console.  In its place they have given us Enterprise Manager Express (EM Express for short). Be default EM Express is configured for the traditional (non-CDB) or container (CDB) database if selected when using the DBCA.  In order to access a PDB with EM Express it needs to be configured using the DBMS_XDB_CONFIG.SETHTTPSPORT() procedure.

Key things to remember about Enterprise Manager Database Express.
  • EM DB Express is not Cloud Control or Grid Control!
  • EM DB Express is not a replacement for the DB Control from 11g, as it has significantly less functionality.
  • A DBA will not be able to administer the database using just EM DB Express.
If your organisation uses Cloud Control, which it should, you will probably never use EM Database Express. If on the other hand you are playing around with the database and want a pretty interface to perform some tasks, the EM Database Express might be your answer.


 EM Express Architecture
EM Express is designed to be lightweight and to incur minimal overhead on the database server. In order to achieve this goal, EM Express is built inside the Oracle Database and only uses internal infrastructure components. . such as XDB and SQL*Net. It does not require any separate middle-tier components.

Since EM Express is built inside the database, the database has to be open in order to use EM Express, and EM Express cannot perform actions outside the database.

EM Express does not have background tasks or processes that periodically collect information. Instead, it utilizes data that is already collected by the database. Data is requested only when the user interacts with the UI and all UI processing is done in the browser, thus minimizing load on the database server.

 Software Requirements
The following is a list of software requirements:
  • Oracle Database 12c

Prerequisites

Before starting this tutorial, you should:
  • Have installed Oracle Database 12c.


Ensure database and listener is running

[oracle@test ~]$ lsnrctl start

[oracle@test ~]$ lsnrctl stop

[oracle@test ~]$ . .bash_profil <Set Env.>


Thet port that EM Express is running on can be identified from the listener status (lsnrctl status) command.  By default Oracle will pick a port between 5500 to 5599 to bring EM Express up on.  In the image below, we can see that the EM Express is running on port 5500. See in Red colour.


[oracle@test ~]$ lsnrctl status


LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 18-JUN-2015 10:13:50

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                17-JUN-2015 16:08:01
Uptime                    0 days 18 hr. 5 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.oracle.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test.oracle.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ORA12C/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ORA12C" has 1 instance(s).
  Instance "ORA12C", status READY, has 1 handler(s) for this service...
Service "ORA12CXDB" has 1 instance(s).
  Instance "ORA12C", status READY, has 1 handler(s) for this service...
Service "pdbora12c" has 1 instance(s).
  Instance "ORA12C", status READY, has 1 handler(s) for this service...
The command completed successfully

 Once we know the port that EM Express is running on we can point our browser to the URL that will allow us to access the EM Express login page.  On my testing VM my URL is:

Find HTTPS URL:-

SQL> SELECT 'https://'||SYS_CONTEXT('USERENV','SERVER_HOST')||'.'||SYS_CONTEXT('USERENV','DB_DOMAIN')||':'||dbms_xdb_config.gethttpsport()||'/em/' from dual;

'HTTPS://'||SYS_CONTEXT('USERENV','SERVER_HOST')||'.'||SYS_CONTEXT('USERENV','DB
--------------------------------------------------------------------------------
https://test.:5500/em/

SQL> SELECT 'https://'||SYS_CONTEXT('USERENV','SERVER_HOST')||':'||dbms_xdb_config.gethttpsport()||'/em/' from dual;

'HTTPS://'||SYS_CONTEXT('USERENV','SERVER_HOST')||':'||DBMS_XDB_CONFIG.GETHTTPSP
--------------------------------------------------------------------------------
https://test:5500/em/


https://192.168.1.115:5500/em/login

When I access this URL, I’m given the log in page for EM Express.



In order to login to EM Express, we  can use any of the users that have access to the database as long as they are granted the EM_EXPRESS_BASIC or EM_EXPRESS_ALL roles.  Users like SYS and SYSTEM, have access to the EM Express by default.  Once in EM Express, the main page shows a lot of information related to the database connected to.  Have a look around before passing judgement on this new console, it is loaded with a lot of great features for developers and administrators a like.


[root@test Desktop]# yum install flash* <Install updated flash rpm>
EM User_id:- sys
Em Password:- <password you specified during your installation>

Usage

The menu structure for DB Express is quite simple.
Configuration
  - Initialization Parameters
  - Memory
  - Database Feature Usage
  - Current Database Properties

Storage
  - Undo Management
  - Redo Log Groups
  - Archive Logs
  - Control Files

Security
  - Users
  - Roles

Performance
  - Performance Hub
  - SQL Tuning Advisor

 

Database Administration Functions

The three main categories of administrative tasks are:
  • Configuration
  • Storage
  • Security

Configuration

The four main features available in the Configuration menu are Initialization Parameters, Memory Configuration, Database Feature Usage and Database Properties.
Database Administrators can view and set initialization parameters for one or more instances of the database.  They can also determine how memory has been configured, and in particular, the amount of memory allocated to the SGA and PGA, the top processes consuming memory, and whether or not any of the automatic memory management features are in use.  In addition, memory advisor data is also displayed on the page. 

Storage

As part of Storage administration, DBAs can manage redo logs, archive logs, and tablespaces (view space consumption, create and/or alter tablespaces).  In addition, DBAs are also given some visibility into the control file contents.  DBAs can also view the Undo Advisor, as well as undo statistics, such as the undo generation rate and undo space usage. 

Security

DBAs can use the features available in the Security menu to manage users, roles and profiles by creating, altering or granting and revoking privileges from them.

How can I find the port on which EM Express is configured?


[oracle@test ~]$ lsnrctl status | grep HTTP
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test.chintels.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ORA12C/xdb_wallet))(Presentation=HTTP)(Session=RAW))


or from SQL*Plus:

SQL> select dbms_xdb_config.getHttpsPort() from dual;

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


How can I give users read-only access to EM Express?

To grant users read-only access so that they can view the UI but not make any changes, grant them the EM_EXPRESS_BASIC role as follows:

SQL> grant EM_EXPRESS_BASIC to <user>;
How to give full permission to sys user?

SQL> grant EM_EXPRESS_ALL to sys;

             Grant succeeded.


 How do I set up EM Express?

DBCA allows you to set up EM Express at the time of database creation.

If you want to manually set up EM Express, simply configure the HTTPS or HTTP port by logging into the database and setting the port:
SQL> exec dbms_xdb_config.sethttpsport(5500);

or

SQL> exec dbms_xdb_config.sethttpport(8080);
If you are using a listener TCP port other than 1521, you will also need to set the dispatchers and local_listener initialization parameters.

 Can I run EM Express in Safari?
Yes, you can run EM Express in Safari on MacOS.  You can also run EM Express in Safari 5.0.* on Windows, but Safari 5.1.* on Windows is known to have an issue with input text fields that prevents users from entering their username and password on the login page.

 EM Express seems slow when using HTTPS.  Why?
Some browsers disable caching if you are using SSL and have a self-signed certificate.  This is known to occur on Chrome and Safari.  To avoid this issue, use a CA certificate when using HTTPS or use a browser that supports caching when using self-signed certificates (Firefox or IE).
  
Is EM Express supported on Oracle Database Standard Edition?  What about Database XE?

Yes, EM Express is supported on both Standard Edition (SE) and Express Edition (XE).  However, features that require the Diagnostics and Tuning Packs will not be available on SE and XE.  For example, the Performance Menu won't be available on SE and XE because the features require the Diagnostics or Tuning Packs.  Similarly, certain regions of the Home Page, such as the SQL Monitor List, will not be shown on SE and XE because they require the Tuning Pack.
  
Do I need licenses or packs to use EM Express?
You can use the basic administration features offered by EM Express with no additional licenses.  However, to use the performance features, you will need the Oracle Diagnostics Pack.  For the Performance Hub, you will need the Diagnostics Pack and for the SQL Monitor and SQL Tuning Advisor features, you will need the Tuning Pack.
Depending on what packs you own, you should set the control_management_pack_access init.ora parameter on your system.  For example, if you have the Diagnostics Pack, but not the Tuning Pack, you should set the control_management_pack_access parameter=DIAGNOSTIC.

 Do I need any database privileges to use EM Express?

In order to use EM Express, a database user needs to have been granted the EM_EXPRESS_BASIC or EM_EXPRESS_ALL role.  The DBA role includes both the EM_EXPRESS_BASIC and the EM_EXPRESS_ALL roles.
EM_EXPRESS_BASIC grants a user read-only privileges, so that the user can view pages but not perform any actions.  EM_EXPRESS_ALL grants a user all privileges required to perform any action in EM Express.

Does EM Express have support for RAC?

Yes.  EM Express is a database management tool that is automatically RAC-aware.  When connected to a RAC system, the information displayed is for the entire database, i.e. for all instances.  For example, the average active session values is aggregated across all instances.  In addition, an extra Instances tab is displayed in the Performance Region on the DB Home Page to show the distribution of average active sessions across instances.


What is the recommended screen resolution for EM Express?
Although the EM Express UI dynamically resizes based on the screen real-estate available, it works best with resolutions of at least 1280x1024 or 1600x900. 
How can I see Advisor Data on the Memory Page?
The advisor data visible at the top right panel of the Memory page is dependent on the memory configuration settings that are in use.
  • If Automatic Memory Management is used, then only the Memory Advisor is displayed on the page.
  • If Automatic Shared Memory Management is used, then the SGA Advisor, along with the PGA Advisor is displayed.
  • If Manual Shared Memory Management is used, then the Buffer Cache Advisor, along with the PGA Advisor is displayed

I’m trying to perform a task that I used to do in DB Control.  Where is it in EM Express?
EM Express is not a direct replacement for DB Control.  As explained in the Architecture section, EM Express is built inside the database server and there are limitations as to what it can do.  EM Express is also focused on providing performance management and monitoring functionality, and is not meant to be an all around database administration tool.

Why do I see a “Warning” icon on the Memory Page?
The warning icon is displayed if the memory configuration is different across the instances in your RAC cluster.  For example, this may be displayed if one instance uses Automatic Memory Management, while the other instance uses Manual Shared Memory Management.

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...