Vous êtes sur la page 1sur 5

What is OEM (Oracle Enterprise Manager)?

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.
Back to top of file

What are the components of OEM?
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.

Back to top of file

How does one stop and start the OMS?
Use the following command sequence to stop and start the OMS (Oracle Management Server):
oemctl start oms

oemctl status oms sysman/oem_temp

oemctl stop oms sysman/oem_temp

Windows NT/2000 users can just stop and start the required services. The default OEM administrator is
"sysman" with a password of "oem_temp".

NOTE: Use command oemctrl instead of oemctl for Oracle 8i and below.

Back to top of file

How does one create a repository?
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.

Back to top of file

How does one list one's databases in the OEM Console?
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:

(SID_DESC =

(GLOBAL_DBNAME = DB_name_for_OEM)

(SID_NAME = ...

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.

Back to top of file

Should the OEM Console be displayed at all times (when there 
are scheduled jobs)?
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.

Back to top of file

What kind of jobs can one schedule with OEM?
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.
Back to top of file

How does one backout events and jobs during maintenance 
slots?
Managemnet and data collection activity can be suspended by imposing a blackout. Look at these examples:
agentctl start blackout # Blackout the entrire agent

agentctl stop blackout # Resume normal monitoring and management

agentctl start blackout ORCL # Blackout database ORCL

agentctl stop blackout ORCL # Resume normal monitoring and management

agentctl start blackout -s jobs -d 00:20 # Blackout jobs for 20 minutes

Back to top of file

What is the Oracle Intelligent Agent?
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.

Back to top of file

How does one start the Oracle Intelligent Agent?
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/.

Back to top of file


Can one write scripts to send alert messages to the console?
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:
Event Name: /oracle/script/myalert

Object: *

Severity: *

Message: *

One can now write the script and invoke the oemevent command to send alerts to the console. Look at this
example:
oemevent /oracle/script/myalert DESTINATION alert "My custom error message"

where DESTINATION is the same value as entered in the "Monitored Destinations" field when you've registered
the event in the OEM Console.
Back to top of file

Where can one get more information about TCL?
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:

• The Tcl Developer Xchange - download and learn about TCL


• OraTCL at Sourceforge - Download the OraTCL package
• Tom Poindexter's Tcl Page - Oratcl was originally written by Tom Poindexter

Back to top of file

Are there any troubleshooting tips for OEM?
• 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:

C:\Orawin95\Bin> RegSvr32 mmdx32.OCX

C:\Orawin95\Bin> RegSvr32 vojt.OCX

• If you have a problem starting the Oracle Agent

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.

Vous aimerez peut-être aussi