Oracle® Database System Administration Guide 10g Release 2 (10.2) for IBM z/OS on System z Part Number B25398-03 |
|
|
PDF · Mobi · ePub |
This chapter introduces the Oracle Enterprise Manager Management Agent, and provides configuration information.
The following topics are included:
The Oracle Management Agent runs jobs and events sent by the Oracle Enterprise Manager and can start up and shut down a database. It can function regardless of the status of the network connection, and it can run even if the database is down. It enables the database abministrator to monitor and control a database from a central location on the network.
The Management Agent is controlled using a command in the z/OS UNIX System Services shell environment. Currently, it is the only component of Oracle Enterprise Manager that is implemented for Oracle Database for z/OS. For more information on the Management Agent, refer to the Oracle Enterprise Manager Book Set.
The Management Agent is installed with Oracle Database for z/OS. Oracle Universal Installer also configures most of the required parameters.
For the Management Agent to work correctly on z/OS, the following changes must be made to the system:
The Mangement Agent is a multi-threaded application which starts and stops numerous threads during its operation. The BPX parameter file needs to be altered and activated on your system, as follows:
MAXTHREADS(20000)
BPX parameters are set in the SYS1.PARMLIB(BPXxxx
).
The nmo and nmp executable needs to have its extended attributes set as follows:
extattr +p nmo extattr +p nmb
This is because the executable uses the c function __passwd
to verify a user and password before attempting to execute a command on behalf of a user (for example, database shutdown and startup).
The ownership of the em*
executables in the ORACLE_HOME/bin
directory must be set to that of the user who will run the Management Agent.
To complete the configuration, the following three files need additional customization:
The emd.properties
file in the sysman/config
directory
This file contains the global variables for the Management Agent. For most installations, the following two parameters need to be modified:
REPOSITORY_URL=http://host:port/em/upload/
This is the location of the Oracle Management Service where you want the Management Agent to register.
EMD_URL=http://local_host:port/emd/main/
This is the location and port where you want the Management Agent to listen for communications from clients.
The targets.xml
file in the sysman/emd
directory
This file contains the information about the local system and its database instances. It is in XML format and needs to be customized. Although the Management Agent attempts to configure this file, z/OS differences may not permit it to do so.
The following is a sample targets.xml
file:
<?xml version = "1.0"?> <Targets AGENT_SEED="153361320"> <Target TYPE="oracle_emd" NAME="local_host:port" VERSION="1.0" <Target TYPE="host" NAME="local_host" VERSION="1.0"/> <Target TYPE="oracle_database" NAME="DB_sid" VERSION="1.0"> <Property NAME="MachineName" VALUE="local_host"/> <Property NAME="Port" VALUE="DB_port"/> <Property NAME="SID" VALUE="DB_sid"/> <Property NAME="ConnectDescriptor" VALUE="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(local_host)(PORT=DB_port)))(CONNECT_DA TA=(SID=DB_sid)))"/> <Property NAME="OracleHome" VALUE="oracle_home"/> <Property NAME="UserName" VALUE="DBSNMP"/> <Property NAME="password" VALUE="password" ENCRYPTED="FALSE"/> <Property NAME="Role" VALUE="NORMAL"/> </Target> </Targets>
Variables for the previous example are defined as follows:
Table 13-1 Variable Descriptions for Code Example
Variable | Description |
---|---|
AGENT_SEED= |
The value of this parameter should be the same as that of the |
|
Host of the EMD_URL |
|
Port number of the EMD_URL |
|
Oracle instance on the local system or a remote system |
The following variables for the previous example can be obtained from the tnsnames.ora
file for the instance being monitored. They are defined as follows:
Table 13-2 Variable Descriptions for Code Example
Variable | Description |
---|---|
|
Local host name of the system (for example, mvs05.us.oracle.com) |
|
Port on which the instance is listening |
|
Instance ID of the Oracle instance. Corresponds to the |
|
Location of the Oracle database software |
|
DBSNMP database user account |
|
DBSNMP database user account password Once the Management Agent starts up, it alters the |
The /var/opt/oratab
file
This file should contain one line for every database instance being configured, as in the following example:
instance_name:ORACLE_HOME:N
In the previous example, instance_name
is the name of the database instance, and ORACLE_HOME
is the Oracle home where the Oracle database software is located.
You use the emctl
command to control the Management Agent. For a description of this and other Management Agent commands, refer to the Oracle Enterprise Manager Advanced Configuration manual.
To issue this command, first log in to the z/OS UNIX System Services environment as the user who owns the Management Agent code. This user also needs DBA privileges.
Set up environment variables in the ENV file located in the Oracle home directory.
To start the Management Agent, use the following command:
$ emctl start agent
To query the status of agent, use the following command:
$ emctl status agent
To upload the information of Management Agent to the Management Service, use the following command:
$ emctl upload
The host information appears at the Management Service location. you need to upload the information only if the status of the agent is not automatically updated.
To stop the Management Agent, use the following command:
$ emctl stop agent
The log files and tracing information will be written to the ORACLE_HOME/sysman/log
file.