Anda di halaman 1dari 22

OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

OEM ORACLE ENTERPRISE MANAGER

OEM(EM) is known as Oracle Enterprise Manager brought to you by Oracle Corporation.


Enterprise Manager (OEM) is Oracle's GUI-based comprehensive Database-Management tool that
lets you manage Oracle database efficiently. It comes along with Database Server Software.

When you install an Oracle database, the OUI (Oracle Universal Installer) installs the OEM.
This Web-based Database Control serves as a tool for managing your Oracle database.

From the Oracle Enterprise Manager, simply you can perform administrative tasks such as
creating Schema objects (tablespaces, tables, and indexes), managing user security, backing
up and recovering your database, and importing and exporting data. You can also view
performance and status information about your database instance.

Oracle Enterprise Manager comes in 3 flavors:

Database Control, Grid Control, and Cloud Control.

Using Database Control (OEM) you can manage only one database. If you want to administer
more than one database, then you must configure a separate Database Control (OEM) for each
database; otherwise you can go for Grid/Cloud Control Configuration.

In order to manage several databases, you need to separately install the OEM Grid Control
Software on your Server and the OEM AGENT Software on all the targets you wish to monitor.
OEM Grid Control is available only if an Oracle Management Agent is installed on the System.

Simply Grid and cloud Control is a tool for monitoring the whole of your infrastructure.
Big Advantage of Using Grid and Cloud Control you can monitor & manage NON Oracle databases
also (SQL Server, MY-SQL, and many more...)

The OEM Database Control is automatically installed along with Database Server Software.
To monitor and manage just a Single Oracle database, you need only OEM Database Control.
You do not have to configure anything to use the OEM Database Control it is ready to use
the moment you create a new Oracle database using DBCA tool.

You can configure OEM (Database Control) in 2 ways.

DBCA Database Configuration Assistant.


EMCA Enterprise Manager Configuration Assistant.

When you use the DBCA to configure a new Oracle database, a GUI Interface helps you to
configure OEM Database Control. After the database creation, if you want to use Operating
System command line to configure OEM Database Control, you can choose EMCA.

This document completely talks about Enterprise Manager for Database Control. We can see
steps to create, drop, and recreate the Database Control Repository and Configuration files
in an Oracle database version of 11.2

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

DATABASE CONTROL CONFIGURATION USING DBCA

$ dbca

Welcome Screen > Next


1) Create a database > Next
2) General Purpose of Transaction Processing > Next
3) Enter Global Database Name and SID > Next
On step 4 you can see the option to configure OEM (Ensure the check box is ticked)

If you encounter an error like shown in the picture above, startup the listener.
If you did not configure listener, you need to configure a listener using NETCA/NETMGR.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

DBCA asks to enter password for the user accounts SYS, SYSTEM, DBSNMP, SYSMAN. You can
enter different passwords to each administrative account or you can enter same password to
all the accounts as shown in the picture given below. My Preference goes for same password.

Following picture ensures Enterprise Manager Repository is set to TRUE

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Once the database creation is complete, an URL to access the EMC is shown as below.
Oracle automatically starts up the Database Control service.

First of all you need a Web-browser to access Oracles OEM. Now


I am trying to login to EM page to administer our database using above given address.
Once I entered Database Control URL in Web browser
I got warning message for Secure Connection Failed

Click Or you can add an exception


> Add Exception
> Get Certificate
> Confirm Security Exception

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Now I am getting access to the login page.


We need to supply login credentials to access this Web-based tool.
Enter user SYS and its password, then select "SYSDBA" as a role then click Login.

Now you can monitor and manage the crms database through OEM (Database Control).

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

EMCA AND EMCTL

EMCA Enterprise Manager Configuration Assistant.


EMCTL Enterprise Manager Control.

EMCA and EMCTL both are Oracle Utilities for Enterprise Manager.

EMCA provides a command-line interface for configuring Database Control.


EMCA can be used if a Non-Graphical user interface is preferred to configure OEM.

EMCTL is a command line utility to administer/control core components of Enterprise Manager.


This utility provides a facility to manage all aspects of the Enterprise Manager console
including the OEM console, OEM agent and OMS (Oracle Management Service).

EMCA and EMCTL utilities are installed $ORACLE_HOME/bin directory in UNIX/LINUX Systems.

$ cd $ORACLE_HOME/bin
$ ls -l emca emctl
-rwxr-x--- 1 oracle oinstall 3522 Oct 18 05:41 emca
-rwxr-x--- 1 oracle oinstall 15603 Oct 18 05:41 emctl

EMCA is a Command line utility and provides simple and standardized options to create, drop
and re-configure the Database Control that is called as DBConsole. The EMCA utility can be
launched by running emca command from $ORACLE_HOME/bin directory.

When you DBCA to create a database, it provides an option to choose whether the Enterprise
Manager Database Control should be configured for the database.

If the database is created manually or if the appropriate option was not chosen in the
DBCA, then the Database Control can be configured from the EMCA command utility.

MAJOR DIFFERENCE BETWEEN DBCA Vs EMCA

DBCA does NOT provide any options to re-configure the DBControl.


But EMCA can perform all possible customizations for existing DBControl.
E.g. drop dbconsole, recreate dbconsole, upgrade, etc...

ACCESSING THE ENTERPRISE MANAGER

Use a Web browser to access the Database Control URL: http://hostname:portnumber/em


Point your Web browser (such as Internet Explorer or Firefox) to the OEM URL:

In the URL, HOSTNAME is the name of the Machine on which you installed the Oracle database,
and PORT_NUMBER is the Database Control HTTP Port number.

I have installed the Oracle 11g database on the Linux Machine named as ausuat.com and the
installer indicated that Enterprise Manager Console HTTP Port number is 5500.

http://hostname:portnumber/em http://ausuat.com:5502/em

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Suppose you do not know the name of the system, you may go to Command Prompt in your system,
and type "hostname" You can get name of the system i.e. hostname.

You can check Port values by viewing the portlist.ini file


Located at $ORACLE_HOME/install/portlist directory.

$ cd $ORACLE_HOME/install/
$ cat portlist.ini

Enterprise Manager Console HTTP Port (hrms) = 1158


Enterprise Manager Agent Port (hrms) = 3938

When the DBControl is initially configured, it uses a default set of ports defined in
respective range for each of the process as listed below.

Database Control [1158, 5500-5519], Default port 1158


EM Agent [3938]|[18301849], Default Port 3938

By default the first port in the range is assigned to the component, if it is available.
For subsequent DBConsole configurations in the same machine, the above port numbers will
be incremented by 1 in their respective ranges and a free port in this range is allocated
for the corresponding process. Again I have configured Database Control for some databases.

$ cat portlist.ini

Enterprise Manager Console HTTP Port (hrms) = 1158


Enterprise Manager Agent Port (hrms) = 3938
Enterprise Manager Console HTTP Port (crms) = 5500
Enterprise Manager Agent Port (crms) = 1830
Enterprise Manager Console HTTP Port (orcl) = 5501
Enterprise Manager Agent Port (db3) = 1831

NOTE: Refer Doc for Port Number and Protocols of Oracle Components.

CHANGING THE OEM DATABASE CONSOLE PORTS

To Find the current HTTP Port settings, you need to search given below.

HTTP Port: Search for REPOSITORY_URL in the


$ORACLE_HOME/HOST_SID/sysman/config/emd.properties file

To change or customize the Port for OEM Database Control Ports,


use the emca -reconfig ports in the command:

$ emca reconfig ports DBCONTROL_HTTP_PORT <port_number>


$ emca reconfig ports DBCONTROL_HTTP_PORT 1860

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

DBCONSOLE CONFIGURATION USING EMCA

The EM Database Control is popularly known as Database Control/DBControl/DBConsole. The


DBConsole repository objects are stored in the SYSMAN & MGMT_VIEW schema of the database.
The Most Common operations performed using EMCA utility are following below.

Create DBConsole, Drop DBConsole, Reconfigure DBConsole and


Reconfigure the DBConsole Ports

If you manually create an Oracle database you must configure the Database Control using
the emca utility. Some of the examples given below.

# Commands to Configure/Create DBConsole

$ emca -repos create -- Create EM repository


$ emca -config dbcontrol db -- Configure dbcontrol
$ emca -config dbcontrol db - repose create

# Commands to Drop DBConsole Configuration

$ emca repos drop -- Drop EM repository


$ emca deconfig dbcontrol db -- Deconfigure only dbcontrol
$ emca -deconfig dbcontrol db - repose drop

# Commands to Recreate DBConsole

$ emca repos recreate -- Recreate EM repository


$ emca config dbcontrol db -- Configure dbcontrol
$ emca -config dbcontrol db - repose recreate

-repos create: Create a new Database Control repository.


-repos drop: Drop the current Database Control repository.
-repos recreate: Drop the current Database Control repository & recreate a new one.
-config dbcontrol db: Configure Database Control for a database.
-deconfig dbcontrol db: De-Configure Database Control.
-cluster: perform configuration operation for a RAC database.
-backup: configure automatic backup for a database.
-upgrade: Upgrades an earlier version of the EM configuration to the current version.

STARTING AND STOPPING THE DATABASE CONTROL CONSOLE PROCESS

To access Oracle Enterprise Manager Console (Database Control) from a client browser, the
Database Control console process dbconsole needs to be running on the database HOST machine.

The dbconsole process is automatically started after installation. However, in the event
that the system needs to be restarted, you can start it manually at the command line.
You can also run commands to stop the dbconsole process or view its status.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

# Commands to Stop/start/status of the Dbconsole Process

$ emca stop dbconsole -- Stop the dbconsole process


$ emca start dbconsole -- Start the dbconsole process
$ emca status dbconsole -- View the Status of the dbconsole process

HOW TO CONFIGURE DBCONSOLE WITH REPOSITORY

To configure the Database Control for your database, you must run the emca utility.

# Configuring/Creating DBConsole along with the Repository

$ emca -config dbcontrol db -repos create

STARTED EMCA at Oct 18, 2016 6:40:25 PM


EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:


Database SID: devdb
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_2 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_2

Local hostname ................ ausuat.com


Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_2
Listener port number ................ 1521
Database SID ................ devdb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 18, 2016 6:40:45 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/devdb/emca_2016_10_18_18_39_24.log.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Oct 18, 2016 6:40:47 PM oracle.sysman.emcp.EMReposConfig createRepository


INFO: Creating the EM repository (this may take a while) ...
Oct 18, 2016 6:44:56 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Oct 18, 2016 6:45:00 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 18, 2016 6:46:40 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 18, 2016 6:46:44 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 18, 2016 6:46:57 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 18, 2016 6:46:57 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 18, 2016 6:47:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 18, 2016 6:47:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ausuat.com:5502/em <<<<<<<<<<<
Oct 18, 2016 6:48:05 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data
will be encrypted. The encryption key has been placed in the file:
/u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb/sysman/config/emkey.ora.
Ensure this file is backed up as the encrypted data will become unusable if this file
is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 18, 2016 6:48:05 PM

The DBConsole repository objects are stored in the SYSMAN & MGMT_VIEW schema of the database

SYS> SELECT username FROM dba_users WHERE username='SYSMAN';

USERNAME
------------------------------
SYSMAN

SYS> SELECT username FROM dba_users WHERE username='MGMT_VIEW';

USERNAME
------------------------------
MGMT_VIEW

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

HOW TO DROP/UNINSTALL DBCONSOLE

Because there are configuration settings stored with Enterprise Manager Console that
reference the hostname, the same must be uninstalled.

$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Oct 18, 2016 6:55:47 PM


EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:


Database SID: devdb
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y


Oct 18, 2016 6:56:02 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/devdb/emca_2016_10_18_18_35_46.log.
Oct 18, 2016 6:56:02 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 18, 2016 6:56:27 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Oct 18, 2016 6:58:17 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 18, 2016 6:58:22 PM

SYS> SELECT username FROM dba_users WHERE username='SYSMAN';


no rows selected

SYS> select username from dba_users where username='MGMT-VIEW';


no rows selected

DATABASE IS PUT INTO A QUIESCED STATE - WHY ?

# Warning can be safely ignored from 11.2.0.1.0

WARNING: While repository is dropped the database will be put in quiesce mode.

When the database is put into a quiesced state, all user access will be temporarily halted.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

NOTE: Starting from 11.2.0.1.0 release, the database is NOT put into QUIESCE mode anymore
for repository drop and recreate operation. This means that EMCA "drop" and "recreate"
commands can be executed for 11.2.x.x database without impacting normal database operations.

FYI: When you drop the repository with EMCA or RepManager on 11.2.X databases, this warning
is appeared. This database version is 11.2.0.4 so I do not bother about the warning.

HOW TO RECONFIGURE ENTERPRISE MANAGER CONSOLE

$ emca -config dbcontrol db -repos recreate

STARTED EMCA at Oct 18, 2016 7:24:45 PM


EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:


Database SID: devdb
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_2 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_2

Local hostname ................ ausuat.com


Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_2
Listener port number ................ 1521
Database SID ................ devdb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

---------------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y


Oct 18, 2016 7:25:49 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/devdb/emca_2016_10_18_18_24_45.log.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Oct 18, 2016 7:25:51 PM oracle.sysman.emcp.EMReposConfig invoke


INFO: Dropping the EM repository (this may take a while) ...
Oct 18, 2016 7:25:52 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Oct 18, 2016 7:25:52 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 18, 2016 7:30:18 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Oct 18, 2016 7:30:23 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 18, 2016 7:32:01 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 18, 2016 7:32:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 18, 2016 7:32:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 18, 2016 7:32:18 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 18, 2016 7:33:21 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 18, 2016 7:33:22 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ausuat.com:5502/em <<<<<<<<<<<
Oct 18, 2016 7:33:28 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:

************************ WARNING ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data
will be encrypted. The encryption key has been placed in the file:
/u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb/sysman/config/emkey.ora.
Ensure this file is backed up as the encrypted data will become unusable if this file
is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 18, 2016 7:33:28 PM

SYS> SELECT username FROM dba_users WHERE username IN('SYSMAN','MGMT_VIEW');

USERNAME
------------------------------
...

Finally, after the successful installation of Enterprise Manager Console, validate the
installation by navigating to the logon page https://ausuat:5502/em/

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

OEM CONSOLE - COMMANDS

# To check status of the DBConsole

$ emctl status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://ausuat.com:5502/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory
/u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb/sysman/log

# To Stop the DBConsole Process

$ emctl stop dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://ausuat.com:5502/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
... Stopped.

# To Start the DBConsole

$ emctl start dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://ausuat.com:5502/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ........ started.
------------------------------------------------------------------
Logs are generated in directory
/u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb/sysman/log

$ emctl secure status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Checking the security status of the DBCONSOLE... Done.
DBCONSOLE is secure at HTTPS Port 5502.
Checking the security status of the Agent... Done.
Agent is secure at HTTPS Port 1832.

$ emctl config agent getTZ


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Australia/Sydney

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

$ emctl getversion
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Enterprise Manager 11g DB Control Version 11.2.0.4.0
Enterprise Manager 10g Agent Version 10.2.0.4.0

$ emctl status agent


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 10.2.0.4.5
OMS Version : 10.2.0.4.5
Protocol Version : 10.2.0.4.5
Agent Home : /u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb
Agent binaries : /u01/app/oracle/product/11.2.0/dbhome_2
Agent Process ID : 30172
Parent Process ID : 30147
Agent URL : https://ausuat.com:1832/emd/main
Repository URL : https://ausuat.com:5502/em/upload/
Started at : 2016-10-18 19:08:13
Started by user : oracle
Last Reload : 2016-10-18 19:08:13
Last successful upload : 2016-10-18 19:09:47
Total Megabytes of XML files uploaded so far : 0.29
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 28.92%
Data channel upload directory :
/u01/app/oracle/product/11.2.0/dbhome_2/ausuat.com_devdb/sysman/recv
Last successful heartbeat to OMS : 2016-10-18 19:09:56
---------------------------------------------------------------
Agent is Running and Ready

$ emctl stop dbconsole


..
Stopping Oracle Enterprise Manager 11g Database Control ...
... Stopped.

$ emctl status agent

Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0


Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Agent is Not Running

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

CHANGE ORACLE ENTERPRISE MANAGER PORT

You can change the port number, provided you have command-line access on the database
server as the user Oracle was installed with. This will cause no downtime on the database,
though Enterprise Manager itself will need to be restarted.

# To Change the Port number

$ emca -reconfig ports -DBCONTROL_HTTP_PORT 5512

STARTED EMCA at Oct 20, 2016 4:40:51 AM


EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:


Database SID: devdb
Password for SYS user:

Do you wish to continue? [yes(Y)/no(N)]: y


Oct 20, 2016 4:56:59 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/devdb/emca_2016_10_20_04_56_48.log.
Oct 20, 2016 4:56:59 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 20, 2016 4:57:35 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 20, 2016 4:58:21 AM oracle.sysman.emcp.EMDBPostConfig performReconfiguration
INFO: Database Control started successfully
Oct 20, 2016 4:58:21 AM oracle.sysman.emcp.EMDBPostConfig performReconfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ausuat.com:5509/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 20, 2016 4:58:21 AM

Not recommended to Specify a port below 1024 on UNIX/LINUX SystemS.

# OEM new Status (Port has been changed)

$ emctl status dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://ausuat.com:5509/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory
/u01/app/oracle/product/11.2.0/dbhome_2/oel5.prod.com_crms/sysman/log

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

EMCA CONFIGURATION FILES

When you install 11g Oracle database, a set of directories and files related to Enterprise
Manager is created in the $ORACLE_HOME directory. Some important configuration files are
read by EMCA command for its operations. These files are used as templates for its operation
such as DBConsole configuration and creation.

$ORACLE_HOME/sysman/config/emca.properties
$ORACLE_HOME/sysman/config/emca.logproperties

Where to find EMCA log files?


Every execution of EMCA command generates EMCA log files. These files are located at

$ $ORACLE_BASE/cfgtoollogs/emca/<db_unique_name>
$ $ORACLE_BASE>/cfgtoollogs/emca/devdb

If DBConsole is configured using DBCA, all the logging messages are written to emConfig.log

$ $ORACLE_BASE/cfgtoollogs/dbca/<db_unique_name>
$ $ORACLE_BASE>/cfgtoollogs/dbca/hrms

When database is upgraded using DBUA, the DBConsole configuration is upgraded by default
as part of Database upgrade process. All the DBConsole upgrade logging messages are written
to the emConfig.log file

$ $ORACLE_BASE/cfgtoollogs/dbua/<db_unique_name>
$ $ORACLE_BASE/cfgtoollogs/dbca/hrms

The EMCA log file is specified in Time format.


Where timestamp is in the format of YYYY_MM_DD_HH24_MI_SS.log
When EMCA is used to create repository /drop repository, the repository specific actions
are logged with timestamp under $ORACLE_BASE/cfgtoollogs/emca/<db_unique_name>/emca...

E.g. emca_repos_create_<timestamp>.log, emca_repos_drop_<timestamp>.log


$ $ORACLE_BASE/cfgtoollogs/emca/<db_unique_name>_emca_repos_drop...
$ $ORACLE_BASE/cfgtoollogs/emca/devdb/emca_repos_drop_2016_10_18_21_52_20.log

5) Files are shared among all instances of the database are stored in $ORACLE_HOME/sysman

$ cd $ORACLE_HOME/sysman
[oracle@ausuat sysman]$ ls
admin bam config emcli emd emdrep install j2ee jlib lib log prov recv

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

Files that are unique to each instance are stored in ORACLE_HOME/hostname_sid/

$ cd $ORACLE_HOME/ausuat.com_crms/
[oracle@ausuat ausuat.com_crms]$ ls
...

The log files for the Management agent for that instance are installed in given location.

$ cd $ORACLE_HOME/hostname_sid/sysman/log
$ cd $ORACLE_HOME/ausuat.com_crms/sysman/log
[oracle@ausuat log]$ ls
...

The files required to deploy the Database Control application are installed in the
$ORACLE_HOME/oc4j/j2ee directory structure.

$ cd $ORACLE_HOME/oc4j/j2ee
[oracle@ausuat j2ee]$ ls
...

You can verify DBConsole is configured or NOT for a Particular database at OS level. If
DBConsole is configured for an Oracle database, you can see under $ORACLE_HOME followed by
oc4j/j2ee/OC4J_DBConsole_HOSTNAME_SID (corresponding HOSTNAME and SID exists).

$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_HOSTNAME_SID
/u01/app/oracle/product/11.2.0/dbhome_2/oc4j/j2ee/OC4J_Dbconsole_ausuat.com_hrms
/u01/app/oracle/product/11.2.0/dbhome_2/oc4j/j2ee/OC4J_Dbconsole_ausuat.com_crms
/u01/app/oracle/product/11.2.0/dbhome_2/oc4j/j2ee/OC4J_Dbconsole_ausuat.com_orcl

DIRECTORY STRUCTURE IN THE MANAGEMENT SERVICE HOME FOR RELEASE 11G

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

INSTALLED COMPONENTS RELATED TO ENTERPRISE MANAGER

Database Console/Enterprise Manager Software is installed under $ORACLE_HOME. For 11.2.0.4


Should have following Software Components installed which can be verified by using the
opatch lsinventory detail | grep Manager command.

$ cd $ORACLE_HOME/OPatch
$ ./opatch lsinventory detail | grep Manager
Database Workspace Manager 11.2.0.4.0
Enterprise Manager Agent 10.2.0.4.5
Enterprise Manager Agent Core Files 10.2.0.4.5
Enterprise Manager Common Core Files 10.2.0.4.5
Enterprise Manager Common Files 10.2.0.4.5
Enterprise Manager Database Plugin -- Agent Support 11.2.0.4.0
Enterprise Manager Database Plugin -- Repository Support 11.2.0.4.0
Enterprise Manager Grid Control Core Files 10.2.0.4.5
Enterprise Manager plugin Common Files 11.2.0.4.0
Enterprise Manager Repository Core Files 10.2.0.4.5
Oracle Configuration Manager 10.3.8.1.0
Oracle Configuration Manager Client 10.3.2.1.0
Oracle Configuration Manager Deconfiguration 10.3.1.0.0
Oracle Enterprise Manager Console DB 11.2.0.4.0
Oracle Recovery Manager 11.2.0.4.0
Oracle Wallet Manager

REFERENCED ORACLE DOCS

Administering Database Control here


Overview of Enterprise Manager Grid Control - here
Configuring Database Control During and After Installation here

REFERENCED MOS NOTES

How to Change Ports for DBControl (Doc ID 395755.1)


How to Manually Upgrade DBConsole configuration after database upgrade (Doc ID 1293264.1)
How to upgrade Database Control Configuration using EMCA (Doc ID 465518.1)
How to Configure DBConsole after the IPADDRESS or HOSTNAME of the Machine has been changed
or If the hostname ipaddress is going to be changed (Doc ID 1333938.1)
Master Note for Enterprise Manager Configuration Assistant (EMCA) in Single Instance
Database Environment (Doc ID 1099271.1) is a good reference.

ADDITIONAL LINKS

How to Manually Remove DBConsole Repository here


Script to Startup/Stop Oracle Enterprise Manager DBConsole here

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

OEM DATABASE CONTROL

To simplify database administration, Oracle provides a Web-Based Management tool called


Oracle Enterprise Manager. There are different ways to deploy Oracle Enterprise Manager.
They are Database Control, Grid Control and Cloud Control.

OEM DATABASE CONTROL

To manage an Oracle 11g database, you can use OEM Database Control. With Database
Control, only one database can be managed/monitored.

You can manage RAC database as well. You can access database control for RAC through any
of the available nodes (hosts) of the RAC database. Dbconsole Process should be running
on the node.

During the database creation or upgrade you can configure Database Control using the DBUA
or DBCA. If you create database manually, you can use EMCA (command line utility) to
configure the Database Control.

If you want to use Database Control, the dbconsole process must be running on the
database Server. You can start and stop the dbconsole process using emctl command.

You need a Web browser to access the Database Control URL: http://hostname:portnumber/em
Where HOSTNAME is the name of the machine database is running, and PORT number is 1158 by
default. Database users with SELECT_CATALOG_ROLE privilege can access Database Control.

OEM GRID CONTROL

Deploy Oracle Enterprise Manager centrally in the environment; i.e. using that Grid Control
you can monitor your whole Infrastructure; i.e. you can manage more than one databases.

Grid Control includes Three Technical Components.

Oracle Management Service (OMS Middle Tier) The application Server.


Oracle Management Agent (OMA - Management Agent)
Oracle Management Repository (OMR - Management Repository)

To deploy OEM centrally, you must install at least one Oracle Management Repository and
one Oracle Management Service within the environment, then install an Oracle Enterprise
Management Agent on each host (target machine) to monitor and manage.

INSTALL ORACLE GRID CONTROL 11g -

Installation of Oracle database (Repository Database)- (11.2.X)


Installation of Java and Web-Logic Server (Middleware).
Installation of Grid control Software. (11.1.X)
Installation of Grid Control agent on the Target Server.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

The 11g Grid Control is NOT the same 11g version you associate with the database. Grid
control does NOT have a 11g R2. The versions of Grid Control 11g are 11.1.0.x, and NO 11.2.

First install the Repository Database and the Middleware Layer then install the Grid Control
Software. Once Grid Control installation is complete finally you can deploy agents on any
Server you wish to monitor.

GRID CONTROL COMPONENTS

Management Agent Responsible for collecting information from the monitoring targets and
transporting sends information to the OEM Management Service i.e OMS.

Management Service This is middle tier (OMS). Responsible to communicate with Management
Agents and stores the collected information in a repository database for analysis purpose.

Management Repository Storage location to store collected data in an Oracle database. An


Organized information can be used by Grind Control Console with the help of OMS.

Enterprise Manager Grid Control (11g) Architecture

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu


OEM - ORACLE ENTERPRISE MANAGER IN 11g R2 | DATABASE CONTROL

GRID CONTROL FUNCTIONALITY

The OMA (agent) runs on the target machine. It is responsible for monitoring all targets
and collects information on the Hardware, Operating System, and installed applications.

The OMS is deployed on the (Middle tier) and collects the data generated by the OMAs.
The OMS pulls the information from the OMAs and loads gathered data into the repository.

Repository is the Storage location (an Oracle database) where all the information collected
by the (OMA) Management Agent gets stored. OMS uploads the monitoring data it receives from
the Management Agents to the Management Repository. The Management Repository then organizes
collected data so that it can be retrieved by OMS and displayed in the Grid Control Console.
Management Repository is configured in Oracle database (it can be existing or new one).

EM GRID Control Console: Using this HTML Interface you can use its possible to monitor and
administer your entire environment from one location. Targets can include Oracle databases,
Application Servers, Listeners, and Third-Party Software. Grid Control is now Obsolete.

OEM DATABASE EXPRESS (EM EXPRESS) 12C

Database Control is NO longer available as of Oracle Database 12c. In its place the
equivalent tool available in Oracle 12c is Database Express (also known as EM Express).

EM Express is almost similar to Database Control in 11g.


EM Express supports only one database.
You can access EM Express using https://hostname:portnumber/em/
Where the default port is 5500 for EM Express but 1158 for Database Control in 11g).

EM Express is an agentless architecture. Everything you need to connect to EM Express is


built into the database kernel. You just need to point a browser to the correct page.

To log in to EM Express, you need anyone of the following privilege.


The EM_EXPRESS_BASIC role provides read-only access to EM Express.
The EM_EXPRESS_ALL role obviously grants all read/write access to all EM Express features.

Using the EM_EXPRESS_BASIC role users can connect to EM Express and view the pages only in
READ-ONLY mode and cannot make any changes. The EM_EXPRESS_ALL role enables users to connect
to EM Express and use all the functionality provided by EM Express (read/write access).

OEM CLOUD CONTROL 12C

Finally OEM Cloud Control 12c is the latest release to manage and monitor multiple hosts.
The name change is Oracle strategy to go with the currently in Popular Technology.

12c does NOT mean it is associated with Oracle 12c database.


Cloud does NOT mean it can manage only virtual environments and Cloud Platforms.

EM12c provides much better management features for entire ORACLE & NON-ORACLE DATABASES.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu