Oracle Enterprise Manager Configuration Guide
Release 1.5.0

A57696-01

Library

Product

Contents

Index

Prev Next

1
Agent Configuration

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:

Installing the Intelligent Agent on Windows NT

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).

Configuring an Intelligent Agent on Windows NT

This section contains the following topics:

Agent Discovery Algorithm

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:

  1. The agent reads the Windows NT registry for the values of the services installed on that machine.

  1. Based on values of the services, the agent reads the listener.ora files to determine the SIDs and ORACLE_HOME directories of the databases which are serviced by that listener.

  2. The agent also reads the listener.ora files for the global names of those databases (GLOBAL_DBNAME parameters).

  3. If 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.

  4. If the 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.

  5. If the 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.

 

Creating a Windows NT User Account for Running Jobs

In order for the agent to execute jobs on a managed node


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.

Creating a New NT User Account

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.

  1. Select the User Manager from the Administrative Tools program group. See the Windows NT documentation for information on the tools.

  1. Select New User from the User menu and check for the following:

    • The "User Must Change Password at the Next Logon" option box is not checked
    • "SYSTEM" or "system" is not used for the user name.

  2. Under the Policies menu of the User Manager NT utility, select the User Rights option.

  3. Check the "Show Advanced User Rights" box.

  4. Select "Logon as a batch job" from the list of privileges.

  5. Give the selected user this privilege.

Assigning Privileges to an Existing NT User Account

To assign privileges to an existing local user account, perform the following steps.

  1. Choose the user on the User Manager panel and check for the following:

    • The "User Must Change Password at the Next Logon" option box is not checked
    • "SYSTEM" or "system" is not used for the user name.

  1. Under the Policies menu of the User Manager NT utility, select the User Rights option.

  2. Check the "Show Advanced User Rights" box.

  3. Select "Logon as a batch job" from the list of privileges.

  4. Add the advanced user right to this user.

Configuring a Domain User as Your Agent User


Note:

Domain users are not supported with 7.3.3 and earlier versions of the agent.

 

To configure a domain user as your agent user, perform the following steps.

  1. Under the Policies menu of the User Manager NT utility, select the User Rights option.

  1. Check the "Show Advanced User Rights" box.

  2. Select "Logon as a batch job" from the list of privileges.

  3. Click the Add button.

    1. Fill in the "List Names From" field: (choose your domain)

    2. Click Show Users button.

    3. In the listbox, choose the domain user.

    4. Click Add.

    5. Click OK.

  4. In the User Rights Policy window, click OK.


Note:

If you have both a local and a domain user with the same name, the local user takes precedence.

 

Controlling Operations of the NT Agent

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.

 

Starting the Intelligent Agent on Windows NT

To start the agent on Windows NT, perform the following steps:

  1. Double-click the Services icon in the Control Panel folder.

  1. Select the OracleAgent service.

    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.

    1. Click the Startup push-button. A Service Startup dialog box appears.

    2. Choose Automatic under the Startup Type.

    3. Click OK on the Service Startup dialog box.

  2. Click the Start push-button to start the agent.

Stopping the Intelligent Agent on Windows NT

To stop the agent on Windows NT, perform the following steps:

  1. Double-click the Services icon in the Control Panel folder.

  1. Select the OracleAgent service.

  2. Click the Stop push-button to stop the agent.

Verify Agent is Running

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.

Starting, Stopping, and Verifying the Status from the DOS prompt

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.

If you want to...   Enter the following command  

Start the agent from the DOS prompt  

net start oracleagent  

Stop the agent from the DOS prompt  

net stop oracleagent  

Verify status of the agent from the DOS prompt  

net start  

Troubleshooting the NT Agent If It Did Not Start Up

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.

  1. Check for messages written to the NT Event Viewer (under Administrative Tools) since this is where the NT agent writes any problems associated with startup.

  1. Check if snmp_ro.ora, snmp_rw.ora, and services.ora are created by the agent on startup. snmp_ro.ora is in the 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:

    • listener.ora
    • tnsnames.ora

  2. Check that you DO NOT have a system path set to external drives.

    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:

    1. Move mapped drive paths out of SYSTEM path variables and into your own.

    2. Reboot to "unset" the systems path.

  3. Check if you have TCP/IP installed. TCP/IP is a requirement.

  4. If you still do not know why the agent did not start, trace the agent.

    1. Set the following variables in snmp_rw.ora:

      nmi.trace_level=admin (or 16 if you want maximum information)

      nmi.trace_directory=<any directory in which the Oracle user has write privileges>

    2. Restart the agent.

    3. Check the log files located in the ORACLE_HOME/NET80/LOG directory.

      NMI.LOG should show general agent problems.

      NMICONFIG.LOG should show problems with autodiscovery.

  5. Ensure that the DNS Host entry is set to the node name in the listener.ora and tnsnames.ora files.

    1. Run the start button-> settings-> control panel-> network-> protocol-> TCP/IP properties.

    2. Check the DNS Host entry. For example, make sure that the entry is not set to the name of the previous engineer.

  6. Turn on tracing for the daemon.

    1. Open net80/admin/sqlnet.ora and add the lines daemon.trace_level=13 and daemon.trace_directory=e:\orant\net80\trace.

    2. Close the console to stop the daemon.

    3. Open the console to restart the daemon in trace mode.

    4. Submit a job and view the daemon.trc file for daemon and console problems.

Controlling Operations of the NT Agent Data Gathering Service

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.

Starting and Stopping the Agent Data Gathering Service on Windows NT

To start the agent data gathering service on Windows NT, perform the following steps:

  1. Double-click the Services icon in the Control Panel folder.

  1. Select the OracleDataGatherer service.

    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.

    1. Click the Startup push-button. A Service Startup dialog box appears.

    2. Choose Automatic under the Startup Type.

    3. Click OK on the Service Startup dialog box.

  2. Click the Start push-button to start the agent data gathering service.

To stop the agent data gathering service on Windows NT, perform the following steps:

  1. Double-click the Services icon in the Control Panel folder.

  1. Select the OracleDataGatherer service.

  2. Click the Stop push-button to stop the agent data gathering service.

Verify Agent Data Gathering Service is Running

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.

Starting, Stopping, and Verifying the Agent Data Gathering Service from the DOS Prompt

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.

If you want to...   Enter the following command  

Start the agent data gathering service from the DOS prompt  

net start oracledatagatherer  

Stop the agent data gathering service from the DOS prompt  

net stop oracledatagatherer  

Verify from the DOS prompt that a client can connect to the agent data gathering service on an NT system  

ORACLE_HOME\odg\bin\vppcntl -ping  

Installing the Oracle Intelligent Agent on UNIX

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.

Running the root.sh Shell Script

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.


Note:

The agent being set to setuid root does not have the same effect as having the root user start the agent. Having the root user start the agent may cause security problems. Consult your platform documentation for exact details on setuid programs.

 

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.

 


Note:

If you have a 7.3.3 or below agent, installing an 8.0.x database is not recommended.

 

Verifying that root.sh Had Been Run Successfully

To verify that root.sh had been run successfully, check the file permissions on dbsnmp.

  1. Enter cd $ORACLE_HOME/bin

    This changes the directory to the $ORACLE_HOME/bin directory where the agent executable resides.

  1. Enter ls -al dbsnmp

    This lists all relevant details about dbsnmp.

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.

Running root.sh

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:

  1. Switch user to root by typing

    su root

  1. Change directory to the $ORACLE_HOME/orainst directory by typing

    cd $ORACLE_HOME/orainst

  2. Run the root.sh shell script by typing

    ./root.sh

  3. Answer the questions asked. For each database created, the entry is of the form: <SID>:<$ORACLE_HOME>:[Y/N]

You will then be automatically exited out of root.sh.

Configuring an Intelligent Agent on UNIX

This section contains the following topics:

Agent Discovery Algorithm

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 tnsnames aliases to connect to different SIDs. The agent depends on valid configurations of tnsnames.ora and listerner.ora. Refer to Testing the Connectivity to Any SID on page C-5.

 

To determine what services are available on its machine (services that the agent will manage), the agent uses the following discovery algorithm

  1. The agent reads the oratab file for values of all the Oracle Homes and SIDs. Depending on the platform, the oratab file can be located in either of the following locations:

    • /etc
    • /var/opt/oracle

  1. Based on the Oracle Homes values found in oratab, the agent reads the listener.ora files to determine which databases are serviced by that listener.

  2. The agent also reads the listener.ora files for the global names of those databases (GLOBAL_DBNAME parameters).

  3. If GLOBAL_DBNAME parameters are not found in the listener.ora file, the agent searches for tnsnames.ora files in a location set by the 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.

  4. If the TNS_ADMIN variable is not set, the agent looks for tnsnames.ora files in the standard locations. For example: $ORACLE_HOME/NETWORK/admin.

  5. If tnsnames.ora files are not found, the database aliases are created as <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.

 

Setting the $ORATAB/ORATAB System Environment

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.

Controlling Operations of the UNIX Agent

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  

lsnrctl dbsnmp_start  

Stop the agent on the UNIX platform  

lsnrctl dbsnmp_stop  

Verify status of the agent  

lsnrctl dbsnmp_status  

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.

Troubleshooting the UNIX Agent If It Did Not Start Up

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.

  1. Check the ORACLE_HOME/NETWORK/log/dbsnmp*.log file for errors on UNIX.

  1. Check that the Oracle user has write permissions to ORACLE_HOME/AGENT/LOG as well as ORACLE_HOME/NETWORK/AGENT.

  2. Check snmp_ro.ora, snmp_rw.ora, and services.ora for the entries created by the agent. snmp_ro.ora is in the ORACLE_HOME/NETWORK/ADMIN directory, and snmp_rw.ora and services.ora are in the ORACLE_HOME/NETWORK/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:

    • listener.ora
    • tnsnames.ora
    • oratab

  3. If you still do not know why the agent did not start, trace the agent by setting the following variables in snmp_rw.ora:

    • nmi.trace_level=admin (or 16 if you want more information)
    • nmi.trace_directory=<any directory which the Oracle user can write to>
    • nmi.trace_file=agent

  4. If you have upgraded the database software and one of your machines is having problems with the generated snmp_ro.ora, snmp_rw.ora or services.ora file, follow the instructions below:

    1. Run catsnmp.sql under the INTERNAL or SYS account (NOT the dbsnmp account). Normally the catsnmp.sql script is run from catalog.sql upon database creation but since this is an upgrade, you may not have run this script yet. If the necessary scripts have not been run, the dbsnmp account is not created.

    2. If you have more than one SID or older SIDs referenced in the oratab, run catsnmp.sql against each of them also.

    3. The snmp_ro.ra file is a read only file which means that all changes to the file will be overwritten each time the agent is started. You can make changes (if needed) to the snmp_rw.ora file.

    If you are trying to do backups, you must run backupts.sql with the dbsnmp/dbsnmp account.


Warning:

Please do not modify the tcl scripts (job and events scripts written in Tool Command Language) which come with the agent. If you want to submit a job different than the ones that are predefined with the agent, use the TCL Job where you are allowed to pass in arbitrary scripts and have the agent execute them.

 

Controlling Operations of the UNIX Agent Data Gathering Service

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:

If you want to...   Enter the command...  

Start the agent data gathering service on UNIX platforms  

/etc/init.d/vppcntl start  

Stop the agent data gathering service on UNIX platforms  

/etc/init.d/vppcntl stop  

Verify that a client can connect to the agent data gathering service on UNIX platforms  

/etc/init.d/vppcntl ping  

On UNIX, the agent data gathering service's message log is $ORACLE_HOME/odg/bin/alert_dg.log.

Oracle Intelligent Agent and Oracle Names

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.

 

Roles and Users Required by the Agent

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.


Note:

The location of catsnmp.sql varies based on the database version you are running and the platform. For example, on NT for an Oracle 8.0.4 database, the script is located at ORACLE_HOME\rdbms73\admin. Please note that there is no harm in running the catsnmp.sql script more than once.

 




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index