OEM is a set of systems management tools provided by Oracle Corporation for
managing the Oracle environment. It provides tools to monitor the Oracle
environment and automate tasks (both one-time and repetitive in nature) to
take database administration a step closer to "Lights Out" management.
Oracle Enterprise Manager (OEM) has the following components:
Management Server (OMS): Middle tier server that handles communication with the
intelligent agents. The OEM Console connects to the management server to
monitor and configure the Oracle enterprise.
Console: This is a graphical interface from where one can schedule jobs,
events, and monitor the database. The console can be opened from a Windows
workstation, Unix XTerm (oemapp command) or Web browser session
(oem_webstage).
Intelligent Agent (OIA): The OIA runs on the target database and
takes care of the execution of jobs and events scheduled through the Console.
For OEM v2 and above, start the Oracle Enterprise Manager Configuration
Assistant (emca on Unix) to create and configure the management server and
repository. Remember to setup a backup for the repository database after
creating it.
The following describes means to create a OEM V1.x (very old!!!) repository on
WindowsNT:
Create a tablespace that would hold the repository data. A size between 200-
250 MB would be ideal. Let us call it Dummy_Space.
Create an Oracle user who would own this repository. Assign DBA,
SNMPAgent, Exp_Full_database, Imp_Full_database roles to this user. Lets
call this user Dummy_user. Assign Dummy_Space as the default tablespace.
Create an operating system user with the same name as the Oracle
username. I.e. Dummy_User. Add `Log on as a batch job' under advanced
rights in User manager.
Fire up Enterprise manager and log in as Dummy_User and enter the
password. This would trigger the creation of the repository. From now on,
Enterprise manager is ready to accept jobs.
Follow these steps to discover databases and other services from the OEM
Console:
1. Ensure the GLOBAL_DBNAME parameter is set for all databases in your
LISTENER.ORA file (optional). These names will be listed in the OEM Console.
Please note that names entered are case sensitive. A portion of a listener.ora
file:
2. Start the Oracle Intelligent Agent on the machine you want to discover.
See section "How does one start the Oracle Intelligent Agent?".
3. Start the OEM Console, navigate to menu "Navigator/ Discover Nodes".
The OEM Discovery Wizard will guide you through the process of discovering
your databases and other services.
When a job is submitted the agent will confirm the status of the job. When the
status shows up as scheduled, you can close down the OEM console. The
processing of the job is managed by the OIA (Oracle Intelligent Agent). The OIA
maintains a .jou file in the agent's subdirectory. When the console is launched
communication with the Agent is established and the contents of the .jou file
(binary) are reported to the console job subsystem.
Note that OEM will not be able to send e-mail and paging notifications when the
Console is not started.
OEM comes with pre-defined jobs like Export, Import, run OS commands, run
sql scripts, SQL*Plus commands etc. It also gives you the flexibility of
scheduling custom jobs written with the TCL language.
The Oracle Intelligent Agent (OIA) is an autonomous process that needs to run
on a remote node in the network to make the node OEM manageable. The
Oracle Intelligent Agent is responsible for:
Discovering targets that can be managed (Database Servers, Net8
Listeners, etc.);
Monitoring of events registered in Enterprise Manager; and
Executing tasks associated with jobs submitted to Enterprise Manager.
One needs to start an OIA (Oracle Intelligent Agent) process on all machines
that will to be managed via OEM.
For OEM 9i and above:
agentctl start agent
agentctl stop agent
For OEM 2.1 and below:
lsnrctl dbsnmp_start
lsnrctl dbsnmp_status
On Windows NT, start the "OracleAgent" Service.
If the agent doesn't want to start, ensure your environment variables are set
correctly and delete the following files before trying again:
1) In $ORACLE_HOME/network/admin: snmp_ro.ora and snmp_rw.ora.
2) Also delete ALL files in $ORACLE_HOME/network/agent/.
Start the OEM console and create a new event. Select option "Enable Unsolicited
Event". Select test "Unsolicited Event". When entering the parameters, enter
values similar to these:
One can write custom event checking routines for OEM using the TCL (Tool Command Language) language.
Check the following sites for more information about TCL:
Create the OEM repository with a user (which will manage the OEM) and
store it in a tablespace that does not share any data with other database users.
It is a bad practice to create the repository with SYS and System.
If you are unable to launch the console or there is a
communication problem with the intelligent agent (daemon).
Ensure OCX files are registered. Type the following in the DOS prompt
(the current directory should be $ORACLE_HOME\BIN:
Solution A: Backup the *.Q files and Delete all the *.Q Files
($Oracle_home/network/agent folder)
Backup and delete SNMP_RO.ora, SNMP_RW.ora, dbsnmp.ver and services.ora files
($Oracle_Home/network/admin folder)
Start the Oracle Agent service.
Solution B: Your version of Intelligent Agent could be buggy. Check with Oracle
for any available patches. For example, the Intelligent Agent that comes with
Oracle 8.0.4 is buggy.
Sometimes you get a Failed status for the job that was executed
successfully.
Check the log to see the results of the execution rather than relying on this
status.