Oracle Enterprise Manager Configuration Guide Release 1.5.0 A57696-01 |
|
The Oracle Intelligent Agents are processes running on remote nodes in the network. Oracle Enterprise Manager uses Intelligent Agents to run jobs and monitor events on remote sites and to discover services on the node where it resides
This Agent Configuration chapter discusses the following topics:
Intelligent Agents are shipped with the database and installed on remote, managed machines. The Intelligent Agent must be installed in an ORACLE_HOME directory. The agent is installed as a service, called OracleAgent.
For information on installing the Intelligent Agent, please refer to the Oracle Enterprise Manager Installation (CD-ROM insert).
This section contains the following topics:
At agent startup, a script is executed which reads configuration parameters from the Windows NT registry, listener.ora
file, and the tnsnames.ora
file (if it exists).
The agent discovers new services on the machine where it is installed and creates/rewrites/appends to its configuration files: snmp_ro.ora, snmp_rw.ora, and services.ora.
To determine what services are available on its machine (services that the agent will manage), the agent uses the following discovery algorithm:
GLOBAL_DBNAME
parameters).
GLOBAL_DBNAME
parameters are not found in listener.ora, the agent searches for a tnsnames.ora file in a location set by the TNS_ADMIN environment variable.
TNS_ADMIN
variable, which is either in environment or Registry under ORACLE_HOME
, is not set, the agent looks for a tnsnames.ora
file in the standard location, $ORACLE_HOME\net80\ADMIN
.
tnsnames.ora
file is not found, the database alias, <SID>_<hostnames>
, is assigned to a database service. The service will be known to the agent by this alias, and it will be visible as such at the Oracle Enterprise Manager Console.
If multiple aliases exist for the same instance in the TNSNAMES.ORA
, the agent will use the one listed first. If you prefer to use a different alias, reorder the TNSNAMES.ORA
entries and restart the Agent.
Note: If a database or any other new service is installed on the node where the agent resides, the agent must be restarted to add the new service to the agent configuration files. |
In order for the agent to execute jobs on a managed node
ORACLE_HOME\NET80
directory.
Note: If you do not set up the "logon as batch job" privilege, you will receive the "Failed to authenticate user" message when you run jobs on the node. |
Please follow one of the procedures listed below.
To create a new Windows NT user account on the local NT machine (not the database) and grant the "log in as batch jobs" privilege to this user, perform the procedure below.
To assign privileges to an existing local user account, perform the following steps.
To configure a domain user as your agent user, perform the following steps.
Note: If you have both a local and a domain user with the same name, the local user takes precedence. |
This section contains information on controlling the agent through Windows NT and the DOS prompt. It also contains a section on troubleshooting the agent.
Note: Oracle Enterprise Manager and the agent use Net8 to communicate with the databases in question. Please verify that Net8 can connect to every SID in question before attempting to use the agent. |
To start the agent on Windows NT, perform the following steps:
The Startup Type is set to Manual, which allows the agent to be started by a user. If you want the agent to start automatically whenever you start the system, set the Startup Type for Automatic.
To stop the agent on Windows NT, perform the following steps:
To verify that the agent is running, look for its status in the control panel services or type netstart
at a command prompt. OracleAgent should appear in the list of services.
You may also view the NT Task Manager to see the dbsnmp process information.
To start or stop the Agent from the DOS command prompt, enter the appropriate command. From the DOS command prompt, you can also verify that the service is running.
Make sure the agent service is up by checking the OracleAgent service in your control panel. If the agent did not start up, use any of the following hints listed below.
ORACLE_HOME\NET80\admin
directory, and snmp_rw.ora and services.ora are in the ORACLE_HOME\NET80\agent
directory.
Compare the services listed with the services which are available on the machine. Please refer to Appendix A, "Configuration Files" for valid sample files.
If services are missing, check the following files for inconsistency or corruption:
The agent is a service and runs by default as SYSTEM. It also needs DLLs from the ORACLE_HOME/BIN
directory. If you need mapped drives in your path, you MUST NOT set them in the SYSTEM path.
To set your own path:
nmi.trace_level=admin
(or 16 if you want maximum information)
nmi.trace_directory=
<any directory in which the Oracle user has write privileges>
ORACLE_HOME/NET80/LOG
directory.
NMI.LOG
should show general agent problems.
NMICONFIG.LOG
should show problems with autodiscovery.
This section contains information on controlling the agent data gathering service through Windows NT and the DOS prompt.
The agent data gathering service is part of the Oracle Enterprise Manager framework and is used for collecting performance data. This performance data is used by Oracle Capacity Planner and the new Java-based Oracle Performance Manager. If you are not using either of these two products, then you do not need to install the agent data gathering service.
To start the agent data gathering service on Windows NT, perform the following steps:
The Startup Type is set to Manual, which allows the agent data gathering service to be started by a user. If you want the agent data gathering service to start automatically whenever you start the system, set the Startup Type for Automatic.
To stop the agent data gathering service on Windows NT, perform the following steps:
To verify the agent data gathering service is running, look for its status in the control panel services. You may also view the NT Task Manager to see the vppdc process information.
On Windows NT, the agent data gathering service's message log is ORACLE_HOME\odg\bin\alert_dg.log.
To start, stop, or verify that a client can connect to the agent data gathering service from the DOS command prompt, enter the appropriate command.
Install the Oracle Intelligent Agent from the Oracle CD-ROM as per the Oracle Enterprise Manager Installation Guide. The Intelligent Agent is a separate component to select.
After you have successfully installed the agent, the Oracle Installer prompts you to run root.sh.
root.sh, which is a shell script, updates/creates an oratab file. The oratab file is the file where the user will place references to all databases to be discovered by the agent and controlled by the Oracle Enterprise Manager. For each database created, the entry is of the form: <SID>:<$ORACLE_HOME>:[Y/N]
The agent is normally configured by root.sh as a setuid program. If root.sh was successful, the agent will have been installed as setuid root so that the agent can run jobs as the users whose name and password are given in the Preferred Credentials for that host.
To run a setuid program,
chown root dbsnmp chmod 755 dbsnmp
If the agent is not a setuid program, all Enterprise Manager jobs are run with the permissions of the user who started the agent.
The node credentials, the preferred credentials settings for the node, should be set to the user who starts the agent. It is the current username and password which appear when you click File-> Preferences and highlight the desired node name.
The user who submits node jobs to the UNIX node should ultimately be the owner of the ORACLE_HOME or the same user who started the Intelligent agent on UNIX. If the root.sh
does not have the setuid
set, then any job submitted to the agent will run with the privileges of the user indicated above. root.sh
will allow the user to set the preferred credentials for that node to impose its privileges on the job.
Note: Please be aware that only one intelligent agent can be run on one UNIX machine although more than one Oracle Home can exist. |
To verify that root.sh had been run successfully, check the file permissions on dbsnmp.
This changes the directory to the $ORACLE_HOME/bin directory where the agent executable resides.
The output of the ls -al command for dbsnmp should be in the form
-rwsr-xr-x 1 root g651 1497980 Jun 12 21:04 dbsnmp
root is the owner. dbsnmp is the agent executable. In this example, the name of the group is g651. If root is the owner and -rwsr-xr-x are the permissions, then root.sh
had been run successfully.
Check the oratab file for entries for the database SIDs and Oracle Homes. Please refer to the Agent Discovery Algorithm on page 1-15 and your operating system-specific manual for the location of the oratab file.
Values of the Oracle Homes and SIDs should have been written by the root.sh shell script. If there are no entries in the oratab file, perform the following steps:
cd $ORACLE_HOME/orainst
./root.sh
<SID>:<$ORACLE_HOME>:[Y/N]
You will then be automatically exited out of root.sh
.
This section contains the following topics:
At startup, the agent discovers new services on the machine where it is installed and creates its configuration files: snmp_ro.ora, snmp_rw.ora, and services.ora.
Note:
Before attempting to start the agent, please test the Net8 connectivity by using the |
To determine what services are available on its machine (services that the agent will manage), the agent uses the following discovery algorithm
TNS_ADMIN
environment variable. The standard location of thetnsnames.ora
file is $ORACLE_HOME/network/admin
. On Solaris the tnsnames.ora
can be located in the /var/opt/oracle
directory. On other UNIX systems, the tnsnames.ora
can be located in the /etc
directory. You can set a $TNS_ADMIN
environment variable if you do not want to use any of the default locations.
TNS_ADMIN
variable is not set, the agent looks for tnsnames.ora files in the standard locations. For example: $ORACLE_HOME/NETWORK/admin
.
<SID>_<HOSTNAME>
.
If multiple aliases exist for the same instance in the TNSNAMES.ORA
, the agent will use the one listed first.If you prefer to use a different alias, reorder the TNSNAMES.ORA entries and restart the Agent.
Note: If a database or any other new service is installed on the node where the agent resides, the agent must be restarted to add the new service to the agent configuration file. |
It is recommended that you set the $ORATAB/ORATAB
system environment variable before starting the agent.
The 733 and later agents on UNIX look at the ORATAB
file to get a list of databases and their locations local to the server. The file contents look like this:
v732:/u01/oracle/product/7.3.2:n
v733:/u02/oracle/product/7.3.3:y
v732
and v733
are the names of the SIDs, followed by the ORACLE_HOME and then either a "y" or "n" for automatic startup.
To set the oratab environment variable ($ORATAB), type:
setenv ORATAB /etc/oratab
In the example above, ORATAB
is the name you want to call the environment variable and /etc/oratab
is the location and file to be used.
On UNIX, Oracle Enterprise Manager uses the lsnrctl to start and stop the agent. The relevant lsnrctl commands to control the UNIX agent are listed in the table below.
If you want to... | Enter the command... |
---|---|
Start the agent on UNIX platforms |
|
Stop the agent on the UNIX platform |
|
Verify status of the agent |
|
For additional information or restrictions for your platform, see the Intelligent Agent readme in ORACLE_HOME/net80/agent/doc/readme.wri
or ORACLE_HOME/network/agent/doc/readme.wri
.
Make sure agent listener is working. Enter the command:
lsnrctl dbsnmp_status
If the agent did not start up, use any of the following hints listed below.
ORACLE_HOME/AGENT/LOG
as well as ORACLE_HOME/NETWORK/AGENT
.
Compare the services listed with the services which are available on the machine. Please refer to Appendix A, "Configuration Files" for valid sample files.
If services are missing, check the following files for inconsistency or corruption:
nmi.trace_file=agent
If you are trying to do backups, you must run backupts.sql with the dbsnmp/dbsnmp
account.
On UNIX, Oracle Enterprise Manager uses the vppcntl command to start, stop, and verify that a client can connect to the agent data gathering service. The relevant vppcntl commands to control the UNIX agent data gathering service are listed in the table below:
On UNIX, the agent data gathering service's message log is $ORACLE_HOME/odg/bin/alert_dg.log.
The Intelligent Agent 8.0.4 does not use Oracle Names to discover services it manages. It uses GLOBAL_DBNAME parameters in listener.ora files to determine which databases that listener services. The Oracle Enterprise Manager console then uses the GLOBAL_DBNAME parameters to name the database in the Oracle Enterprise Manager Console.
The GLOBAL_DBNAME parameter typically describes the name of the database as it is registered with the Names Server, for example, the name and domain of the database as given in the database initialization parameter file. Values of the GLOBAL_DBNAME parameters must be unique.
If you are running Oracle Names on a machine managed by an Oracle Intelligent Agent, it is assumed that the databases have already been registered with a Names Server and their aliases are defined by the GLOBAL_DBNAME parameters in the listener.ora files.
Note: Please make sure that you are connected to this DBNAME and SID by testing the Net8 connections on that same server. Check the Net8 configuration for further information. |
When running jobs or monitoring events in this environment, the Intelligent Agent does not resolve database aliases via Oracle Names.
For more information on how the Enterprise Manager Console works with Oracle Names, see Chapter 2, Console Configuration.
Note: If you are planning to manage two or more Oracle databases on the same node, make sure the GLOBAL_DBNAME parameters in your listener.ora files are different for all databases. |
The catsnmp.sql script is only installed when you install the database. When an Oracle database is installed, the catsnmp.sql script is automatically run by catalog.sql to create the necessary dbsnmp user account (the user dbsnmp with password dbsnmp) and the SNMPAGENT role for the Intelligent Agent (for 7.3.3 and later).
For security reasons, the customer may need to change the user/password for the Intelligent Agent's database logon. The default account is dbsnmp and the default password is dbsnmp. To change the user name and password to something other than dbsnmp/dbsnmp, you need to open, edit, and rerun catsnmp.sql for your own user and password before you edit the snmp_rw.ora.
The following parameters (connect lines) are needed if you have modified the account and/or password for the agent. You may add them to the snmp_rw.ora
file in the ORACLE_HOME/NET80/ADMIN
when you run the catsnmp.sql script:
SNMP.CONNECT.<svcname>.NAME = <USERNAME> SNMP.CONNECT.<svcname>.PASSWORD = <password>
To determine whether the SNMPAGENT role exists in a database, enter the following SQL command:
SELECT * FROM dba_roles;
If the SNMPAGENT role does not appear, run the catsnmp.sql script on the database.
If you already have several versions of the database running, you must run the catsnmp.sql script on each of these database in order to have the correct setup for all the grants and views the agent needs to contact.
To run the script, you must log in as SYS or INTERNAL.