Oracle Enterprise Manager

  

These are my personal notes that I use as a quick help in my work.
You are welcome to read them.

Contents of current page Top-level home page
 
Index  Java Internet Oracle Notes
Linux Basics Web Basics SQL Notes
Informatica Servlets Apache BkpRstore SQL*Plus
Teradata   LDAP Storage PL/SQL
Windows     Tables OEM
UML   Net8 Portal
SQL Server Python perl Performance OLAP
Vmware Visual Basic PHP/MySQL User Mgmt  
Git        
More technical pages here

Contents

 


Introduction

How the database name is determined in the OEM (see Net8 for more details):

N.B. pw at creation is sysman / oem_temp

Start and stop (cemctrl in 8i and below):

oemctl start oms
oemctl status oms sysman/oem_temp
oemctl stop oms sysman/oem_temp

Windows: start and stop the service "OracleDEFAULT_HOMEManagementServer"

Console: oemapp console (UNIX) or ...\bin\oemapp.bat console (windows)

Launch DBAstudio with oemapp dbastudio

Database assistant: dbca (note that this is not part of OEM)

Use the Enterprise Manager Configuration Assistant (EMCA) to create and load version 2 repository.

 

Documentation: http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=132601.1

Log miner: oemapp lmviewer, then connect as sysdba

 


Clean Start

SERVICES.ORA
This file contains all the services the agent has discovered. This file will be recreated the next time the agent starts.
*.q
These files are the binary representation of all registered and running jobs and events. The agent creates new fresh files on startup when they do not exist. Information about the host the agent is running on is stored in these files. If the name or the IP address of the agent machine changes, these files need to be recreated.
*.inp
These files are parameter files for registered jobs.
*.jou
These files are journal files with information the agent will use to execute jobs.
out*
These files are temporary output files. These files are generated when jobs are being executed and should be automatically removed by the agent after a job finishes.
tcl*
These files are TCL template scripts, including the specific commands specified in the job send to the agent. There are *.tcl files in other directories DO NOT delete the other TCL files. They are scripts that ship with the Agent.
DBSNMP.VER
This file is a text file with the agent version information. This file will also be recreated when the agent starts again.
SNMP_RO.ORA ("$ORACLE_HOME/network/admin" or "TNS_ADMIN" directory)
This file contains read-only information about the Agents discovered services on the machine. This file should never be manually edited! During startup, this file is read if it exists, and then recreated again with the new discovery information.
SNMP_RW.ORA ("$ORACLE_HOME/network/admin" or "TNS_ADMIN" directory)
This file contains read-write information about the Agents discovered services on the machine. Some of the information in this file can be edited by an administrator to provide additional information like tracing / logging and hostname resolution, etc. During startup, this file is also read if it exists and new discovery information is appended to the file.
NMICONF.LOG
Discovery log files
NMI.LOG
SQL*Net connection errors (pre 9.0.1 agents)
DBSNMPC.LOG
Communication thread logging, if logging is enabled (pre 9.0.1 agents)
DBSNMPW.LOG
Working thread logging, if logging is enabled (pre 9.0.1 agents)
AGENTSRVC.LOG
A Windows NT/2000 file that shows startup errors (9.0.1 and later agents)
DBSNMP.LOG
Communication and Work thread logging is in one file (9.0.1 and later agents)

NOTE: DO NOT DELETE the SVPPCART.DAT file that exists with 9.0.1 and later Agents. This file is the definition file for the Agent's Data Gatherer Cartridge and is not generated by the Agent.

The error NMS-00001 is not a problem:
Warning: dbsnmp unable to connect to SNMP master agent

Deleting the 'q' files means that the Intelligent Agent no longer knows anything about any jobs or events that were registered in the EM Console. In other words, it has lost its "state". Removing these 'q' files while jobs and events are submitted against the agent will result in synchronization errors between the OMS and the agent. Therefore, use this method only on specific request by Customer Support when there is an explicit need for re-initializing the Intelligent Agent.

Events and jobs are internally identified by a sequence number. When a "q" file is created, the sequence is reset. The OMS on submission of an event realizes that the internal id that it gets back is less than any other that it has previously registered for the node and triggers the message indicating there is a skew between the systems. The only option is to remove all the events and jobs registered against the failing node and reregister them. As soon as the OMS detects a mismatch of ID's, the Agent will be marked as 'corrupted', and all job or events you wish to send to this agent will fail with the error:
VNI-4040: The agent on node is not in sync with the Management Server

Have unique names for Enterprise Manager repositories. If two repositories with the same name are active intermittently, and communicating with the same agent, the agent will store the job and event information from both repositories under the same name. This will result in ID mismatches and state corruptions on both the agent and the OMS side.

Some queries

select name, userdata, tnsaddr from smp_vdn_target_list;
List of targets of events
select * from smp_vds_sessions_table;
Connected administrator sessions
select * from vdk_rep_control;
Repository version

 


Backup

As usual, there are three methods: cold backup of the database, hot backup of the database and export of the schema. But in all three methods, the OMS's have to be stopped before backing up. The following query should return nothing:
select * from smp_vdf_maslist;

 


Move the Repository

The repository name must be unique throughout the network.

Move the repository:

When copying the repository, a different schema must be created, a different OMS must be configured (on a separate node). Before exporting, de-register all jobs and/or events. Re-register jobs and events after re-starting the new OMS.

 


9iAS V2

emctl stop / start
Start the Enterprise Management Website
oemctl start oms
start the Oracle Management Server
oemctl status oms
status of the Oracle Management Server
 
oemctl stop oms sysman/pw
stop the Oracle Management Server
agentctl start agent
Start the intelligent agent
agentctl status agent
Status of the intelligent agent
oemapp console
Start the console
$ORACLE_HOME/sysman/config/omsconfig.properties
Connection information