Oracle Enterprise Manager Configuration Guide Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index



Go to previous file in sequence Go to next file in sequence

Agent Configuration


The Oracle Intelligent Agents are processes running on remote nodes in the network. Oracle Enterprise Manager uses Intelligent Agents for the following tasks:

This Agent Configuration chapter discusses the following topics:

Topics   Page  

Installing the Intelligent Agent on Windows NT

 

1-2

 

Configuring an Intelligent Agent on Windows NT

 

1-2

 

Installing the Oracle Intelligent Agent on UNIX

 

1-8

 

Running the root.sh Shell Script

 

1-8

 

Configuring an Intelligent Agent on UNIX

 

1-10

 

Oracle Intelligent Agent and Oracle Names

 

1-14

 

Roles and Users Required by the Agent

 

1-15

 

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 the ORACLE_HOME directory.

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:

Topic   See Page  

Agent Discovery Algorithm

 

1-3

 

Creating a Windows NT User Account for Running Jobs

 

1-4

 

Controlling Operations of the NT Agent

 

1-6

 

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.

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

Stage   Action  

1

 

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

 

2

 

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.

 

3

 

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

 

4

 

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.

 

5

 

If the TNS_ADMIN variable is not set, the agent looks for a tnsnames.ora file in the standard locations. For example: $ORACLE_HOME\NETWORK\ADMIN.

 

6

 

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.

 

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

Creating a New User Account

To create a new local Windows NT user account, perform the following steps

Step   Action  

1

 

Select the User Manager from the Administrative Tools program group.

See the Windows NT documentation for information on the tools.

 

2

 

Select New User from the User menu.

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.
 

3

 

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

 

4

 

Check the "Show Advanced User Rights" box.

 

5

 

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

 

6

 

Give the selected user this privilege.

 

Assigning Privileges to an Existing Account

To assign the privilege to an existing account, perform the following steps.

Step   Action  

1

 

Choose the user on the User Manager panel.

The user on the User Manager panel, 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

 

Add the advanced user right to this user.

 

Note:

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

Attention:

Remember that the preferred credentials in the Console need to be set for this user. Refer to Setting Preferences on page 2-9.

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.

Starting and Stopping the Intelligent Agent on Windows NT

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

Step   Action  

1

 

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

 

2

 

Select the OracleAgent service.

Note: 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.
 

3

 

Click the Start push-button to start the agent.

 

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

Step   Action  

1

 

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

 

2

 

Select the OracleAgent service.

 

3

 

Click the Stop push-button to stop the agent.

 

Starting and Stopping the Agent from the DOS prompt

To start or stop the Agent from the DOS command prompt, enter the appropriate command.

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 Agent is Running

To verify that the agent is running, look for its status in the control panel services.

Troubleshooting the 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.

Step   Action  

1

 

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

 

2

 

Check snmp_ro.ora, snmp_rw.ora, and services.ora for the entries created by the agent. Compare the services listed with the services which are available on the machine.

If services are missing, check the following files for inconsistency or corruption:

  • listener.ora
  • tnsnames.ora
 

3

 

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.
 

4

 

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

 

5

 

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 valid directory>
  • nmi.trace_file=agent
 

Installing the Oracle Intelligent Agent on UNIX

Install the Oracle Intelligent Agent from the Oracle CD-ROM. 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 a list of all services 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.

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

Verifying that root.sh Had Been Run Successfully

To verify that root.sh had been run successfully, perform the following steps:

Step   Action   Result  

1

 

Enter cd $ORACLE_HOME/bin

 

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

 

2

 

Enter ls -al dbsnmp

 

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.

Running root.sh

The oratab file must have entries for the database SIDs and Oracle Homes. These entries are written by root.sh shell script. If root.sh was not successful, perform the following steps:

  1. Switch user to root (super-user) by typing

    su root

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

    cd $ORACLE_HOME/orainst

  3. Run the root.sh shell script by typing

    ./root.sh

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

Configuring an Intelligent Agent on UNIX

This section contains the following topics:

Topic   See Page  

Agent Discovery Algorithm

 

1-10

 

Configuration Requirements

 

1-11

 

Controlling Operations of the UNIX Agent

 

1-11

 

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.

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

Stage   Action  

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 two directories:

  • /etc
  • /var/opt/oracle
 

2

 

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.

 

3

 

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

 

4

 

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.

 

5

 

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.

 

6

 

If tnsnames.ora files are not found, the database aliases are created as <SID>_<HOSTNAME>.

 
:

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.

Configuration Requirements

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

 

Note:

For additional information or restrictions for your platform, see the Intelligent Agent README.

Troubleshooting the 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.

Step   Action  

1.

 

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

 

2.

 

Check snmp_ro.ora, snmp_rw.ora, and services.ora for the entries created by the agent.

Compare the services listed with the services which are available on the machine.

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 valid directory>
  • nmi.trace_file=agent
 

4.

 

If you are upgrading your machines, and one of your machines is having problems with the generated snmp_ro.ora, snmp_rw.ora or services.ora file, check for the following:

  1. Run catsnmp.sql under the INTERNAL 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.
  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.

 

General Note:

If you want to launch jobs and events against several databases, the Oracle tools must be installed in the same $ORACLE_HOME as the same release of the agent. By default, the tcl scripts will locate the tools from the $ORACLE_HOME of the agent.

Warning:

Please do not modify the tcl scripts 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.

Oracle Intelligent Agent and Oracle Names

The Intelligent Agent 7.3.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 hierarchal view.

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.

Agents prior to version 7.3.4 did not use the GLOBAL_DBNAME parameters from listener.ora. For example, Intelligent Agent 7.3.3 does not use the GLOBAL_DBNAME parameters. Instead, it polls the tnsnames.ora file for database services to add to the Oracle Enterprise Manager console.

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.

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

If you want to change the user name and password, you need to open, edit, and run catsnmp.sql for your own user and password before you edit the snmp_rw.ora.

The following parameters are not automatically generated, but may be added to the file:

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.

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 7.3.4 database, the script is located at ORACLE_HOME\rdbms73\admin.




Go to previous file in sequence Go to next file in sequence
Prev Next
Oracle
Copyright © 1997 Oracle Corporation.
All Rights Reserved.
Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index