Oracle DBA Tips Corner

     Return to the Oracle DBA Tips Corner.

click me  


Installing Grid Control Management Agent (10.2.0.5)

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview
  2. Pre-Installation Requirements
  3. Install Management Agent (10.2.0.5)
  4. Post Installation Tasks
  5. About the Author



Overview

This article provides one approach (out of several available) used to install and configure the Oracle Management Agent (10.2.0.5) on an Oracle database server node running the Red Hat Enterprise Linux 5 operating system. Installing the Management Agent will be done using the GUI-based Oracle Universal Installer (OUI) interactive method - "Installing Management Agent Using Oracle Universal Installer (OUI)". The OUI is a GUI-based application and therefore requires the use of an X Server. This guide assumes you have a working Oracle Enterprise Manager 10g Grid Control Release 5 environment in place and running.

  For a comprehensive guide on how to install Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) on the Red Hat Enterprise Linux 5 operating system, please see my article "Installing Grid Control (10.2.0.5) on RHEL 5 with 11g Database Repository".

Oracle Management Agent is one of the integral components of the Enterprise Manager Grid Control architecture. Management Agent will discover, monitor and administer all targets on their hosts, including databases, application servers, other software, and aspects of the hosts themselves. Management Agent communicates with the monitored targets, collects information about their health and performances, transports that information to Oracle Management Service (OMS), which in turn stores the collected details in the central repository created in the Oracle database.

For the purpose of this article, the Oracle Management Agent (10.2.0.5) will be installed on a database server node named vmlinux1.idevelopment.info which hosts a single Oracle 10g database named TESTDB1. The Management Agent will be registered with a central Grid Control environment running on the node oemprod.idevelopment.info. The method used in this article to install the Oracle Management Agent will be:

  Installing Management Agent Using OUI

The following is a conceptual view of what the configuration will look like by the end of this document:

Further Reading

Grid Control (and the Management Agent described in this article) is a large, bloated, and overly complex web application which, needless to say, is riddled with a considerable number of bugs. Consequently, this article should not be considered a substitute for completely reading and understanding the official installation guide and release notes from Oracle (although, in many cases, the documentation is as poorly written as the OEM application itself). Pay considerable attention to the prerequisites for your environment before attempting the install. The following links can be used to download the official installation guides and release notes for Oracle Enterprise Manager 10g:

Enterprise Manager 10g Grid Control Release 2 (10.2.0.1)

  Enterprise Manager Grid Control Quick Installation Guide for Linux x86
  Enterprise Manager Release Notes for Linux x86
Enterprise Manager 10g Grid Control Release 5 (10.2.0.5)
  Enterprise Manager Grid Control Release Notes for Linux and Microsoft Windows
Oracle Management Agent
  10g R2 Management Agent Deployment Best Practices



Pre-Installation Requirements

This section provides the pre-installation requirements for installing Oracle Management Agent (10.2.0.5) on Red Hat Enterprise Linux 5.

It should be noted that nearly all of the pre-installation requirements documented in this section should have already been met. The Management Agent installation will use the same oracle UNIX user account and group that was used to install the Oracle Database 10g software.

Required Linux Packages

Verify the following package versions for Red Hat Enterprise Linux 5.

32-bit (x86) Installations

make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5-18
libXp-1.0.0-8.1

64-bit (x86_64) Installations

make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5
glibc-devel-2.5-18 (32 bit)
libXp-1.0.0-8.1
libXp-1.0.0-8.1 (32 bit)

  Note that there are packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both versions are provided on the 64-bit Red Hat Enterprise Linux 5 installation media.

  Ensure that libXp.rpm is installed. Note that this package is not installed by default with the default RPM packages for Red Hat Enterprise Linux 5 and Oracle Enterprise Linux 5 platforms. So, you must install it manually. For Red Hat Enterprise Linux 4, this file is provided by the package xorg-x11-deprecated-libs, which is installed with the default package installation, however, this is not the case for Red Hat Enterprise Linux 5 and Oracle Enterprise Linux 5.

To verify the libXp.rpm package is installed (which in case, mine are), run the following command:

# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep libXp
libXpm-3.5.5-3 (i386)
libXp-devel-1.0.0-8.1.el5 (i386)
libXpm-devel-3.5.5-3 (i386)
libXp-1.0.0-8.1.el5 (i386)
If the libXp.rpm package is not installed, run the following command:
# rpm -ivh </path/to/>libXp.<version>.i386.rpm
You will find /usr/lib/libXp.so.6 when you install the /Server/libXp-1.0.0-8.1.el5.i386.rpm package from the Red Hat Enterprise Linux 5 DVD.


Verify the Oracle User Account

This article assumes the Oracle Database 10g Release 2 software has already been installed on vmlinux1 and as such, includes the UNIX groups oinstall, dba, and oper and the UNIX user account oracle. The Management Agent software will be installed using this same account that was used to install the Oracle 10g database software.

[oracle@vmlinux1 ~]$ cat /etc/group | egrep "^oinstall|^dba|^oper"
oinstall:x:501:
dba:x:502:oracle
oper:x:503:oracle

[oracle@vmlinux1 ~]$ cat /etc/passwd | egrep "^oracle"
oracle:x:501:501:Oracle Software Owner:/home/oracle:/bin/bash

[oracle@vmlinux1 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

alias ls="ls -FA"

export JAVA_HOME=/usr/local/java

# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=TESTDB1

export PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp


Permission Requirements

Ensure that you have read, write, and execute permissions to oraInventory on the node you are installing the Management Agent to.
[oracle@vmlinux1 ~]$ id
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper)

[oracle@vmlinux1 ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

[oracle@vmlinux1 ~]$ ls -l /u01/app/oracle/
total 20
drwxr-x--- 3 oracle oinstall 4096 Apr 16 00:35 admin/
drwxr-xr-x 6 oracle oinstall 4096 Apr 17 02:05 common/
drwxr-xr-x 6 oracle oinstall 4096 May  4 14:09 custom/
drwxrwx--- 6 oracle oinstall 4096 Apr 16 00:21 oraInventory/
drwxrwx--- 3 oracle oinstall 4096 Apr 15 23:12 product/


Host Name Requirement

The host name must be a valid host name. For example, vmlinux1.idevelopment.info or vmlinux1. It cannot, however, be an IP address. At the same time, it cannot be localhost.localdomain as strings used in the /etc/hosts file. At the time of invoking the installer, you can pass "ORACLE_HOSTNAME=<host_name> -local" as an argument if necessary.


Remove any Existing Management Repository

The existing Oracle database (TESTDB1 in this example) must be free of any prior repository contents, whether for Database Control or Grid Control. The existing Oracle 10g database in my example was configured with Database Control:
[oracle@vmlinux1 ~]$ . oraenv
ORACLE_SID = [TESTDB1] ? TESTDB1

[oracle@vmlinux1 ~]$ emctl status dbconsole
TZ set to US/Eastern
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://vmlinux1:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/vmlinux1_TESTDB1/sysman/log


If your existing Oracle database is configured with Database Control, then ensure that you de-configure it before you begin the installation of Management Agent.

To de-configure Database Control for a single instance database, run the following command:

[oracle@vmlinux1 ~]$ echo $ORACLE_SID
TESTDB1

[oracle@vmlinux1 ~]$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop

STARTED EMCA at May 11, 2009 7:46:16 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TESTDB1
Listener port number: 1521
Password for SYS user: xxxxxxxx
Password for SYSMAN user: xxxxxxxx

Do you wish to continue? [yes(Y)/no(N)]: y
May 11, 2009 7:46:27 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/TESTDB1/emca_2009-05-11_07-46-16-PM.log.
May 11, 2009 7:46:28 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
May 11, 2009 7:46:38 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
May 11, 2009 7:47:37 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at May 11, 2009 7:47:38 PM

 

Oracle Real Application Clusters (RAC)

To de-configure Database Control for a RAC database, run the following command:

[oracle@thing1 ~]$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop -cluster

STARTED EMCA at Oct 28, 2009 1:22:29 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database unique name: thingdb
Listener port number: 1521
Password for SYS user: xxxxxxxx
Password for SYSMAN user: xxxxxxxx

Do you wish to continue? [yes(Y)/no(N)]: y
Oct 28, 2009 1:22:49 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
  /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/thingdb/emca_2009-10-28_01-22-28-PM.log.
Oct 28, 2009 1:22:51 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 28, 2009 1:23:04 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Oct 28, 2009 1:24:52 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 28, 2009 1:24:54 PM


NLS_LANG Environment Variable Requirements

If your operating system is Linux, then ensure the NLS_LANG environment variable (or ORA_NLS10 in my case) is set with a value that is compatible with the operating system default locale setting and the database character set.

In this article, I set the ORA_NLS10 environment variable in the .bash_profile log in script for the oracle UNIX account as follows:

export ORA_NLS10=$ORACLE_HOME/nls/data


Grant EXECUTE Privilege on DBMS_RANDOM to DBSNMP

SQL> grant execute on dbms_random to dbsnmp;

Grant succeeded.


Create Oratab Entries

Prepare the Enterprise Manager 10g Grid Control environment by creating the following entry in the /etc/oratab file:
[oracle@vmlinux1 ~]$ echo agent10g:/u01/app/oracle/product/agent10g:N >> /etc/oratab
Verify /etc/oratab entries:
[oracle@vmlinux1 ~]$ cat /etc/oratab | grep '^[^#]'
TESTDB1:/u01/app/oracle/product/10.2.0/db_1:Y
agent10g:/u01/app/oracle/product/agent10g:N

 

Oracle Real Application Clusters (RAC)

If the target database is clustered using Oracle RAC, create the new oratab entry on all nodes in the cluster:

[oracle@thing1 ~]$ echo agent10g:/u01/app/oracle/product/agent10g:N >> /etc/oratab
[oracle@thing2 ~]$ echo agent10g:/u01/app/oracle/product/agent10g:N >> /etc/oratab



Install Management Agent (10.2.0.5)

Download and install the Oracle Management Agent (10.2.0.5) for Linux to the database server vmlinux1.

Download Oracle Management Agent (10.2.0.5)

Depending on the O/S platform (Linux x86 for this example), download the appropriate Oracle Management Agent (10.2.0.5) from the Oracle Technology Network (OTN).

  If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!

Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

  Mass Deployment Agent Software from Oracle

After downloading the Management Agent for your platform, (as the "oracle" user account), extract the archived file to a temporary directory. In this example, I will use /home/oracle/software/management_agent/10.2.0.5/linux_x86.

[oracle@vmlinux1 ~]$ cd /home/oracle/software/management_agent/10.2.0.5/linux_x86
[oracle@vmlinux1 linux_x86]$ unzip Linux_Grid_Control_agent_download_10_2_0_5_0.zip


Install Management Agent

After extracting the Management Agent software, verify you are logged in as the oracle user account, set your environment for the Management Agent (using agent10g from /etc/oratab), start your "X" emulation software (if required) and run the Oracle Universal Installer.

 

Oracle Real Application Clusters (RAC)

If the target database is clustered using Oracle RAC, verify remote access / user equivalence before running the Oracle Universal Installer:

[oracle@thing1 ~]$ ssh thing1 "date;hostname"
Wed Oct 28 13:44:53 EDT 2009
thing1

[oracle@thing1 ~]$ ssh thing2 "date;hostname"
Wed Oct 28 13:45:36 EDT 2009
thing2

[oracle@vmlinux1 ~]$ . oraenv
ORACLE_SID = [TESTDB1] ? agent10g

[oracle@vmlinux1 ~]$ cd /home/oracle/software/management_agent/10.2.0.5/linux_x86/linux/agent

[oracle@vmlinux1 linux_x86]$ env | egrep "ORACLE_|LD_LIBRARY|NLS|TNS_|HOSTNAME" | sort
HOSTNAME=vmlinux1.idevelopment.info
LD_LIBRARY_PATH=/u01/app/oracle/product/agent10g/lib:/lib:/usr/lib:/usr/local/lib
NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/agent10g
ORACLE_PATH=/u01/app/oracle/common/oracle/sql:.:/u01/app/oracle/product/10.2.0/db_1/rdbms/admin
ORACLE_SID=agent10g
ORACLE_TERM=xterm
ORA_NLS10=/u01/app/oracle/product/10.2.0/db_1/nls/data
TNS_ADMIN=/u01/app/oracle/product/10.2.0/db_1/network/admin

[oracle@vmlinux1 linux_x86]$ export DISPLAY=vmlinux1:0

[oracle@vmlinux1 linux_x86]$ ./runInstaller



Specify Installation Type

In the "Specify Installation Type" window, select the forth option (the default and only option available) which is to perform a "Additional Management Agent" install.


Specify Installation Location

Specify the "Parent Directory" that will be used to install the Management Agent". In this example, I will use "/u01/app/oracle/product" as the Parent Directory, however, the actual directory that will be created is "/u01/app/oracle/product/agent10g".


My Oracle Support

(Optional) Specify an email address and My Oracle Support login credentials.


Product-Specific Prerequisite Checks

The Prerequisite check screen will appear and identify possible deficiencies in kernel settings, software packages needed, host configuration, or space available. During the installation of Oracle Management Agent, no deficiencies should occur.

There is one particular exception and that is if you receive the warning:

Checking for the Hostname...
Check complete. The overall result of this check is: Failed <<<<
Problem: The host name in /etc/hosts is not proper.
If you receive this warning, it is safe to ignore. Acknowledge the warning by clicking the checkbox and continuing the installation.


Specify Oracle Management Service Location

Enter the host name of the Oracle Management Service (OMS) location. When specifying the host name, use the fully qualified host name (including domain). Also, do not include the protocol when entering the host name (that is, http:// or https://). The default port (4889) is automatically entered in the "Management Service Port" field. For the purpose of this example, the default port will be used.


Specify Agent Registration Password

If the OMS is found to be running in a secure mode, the "Specify Agent Registration Password" screen appears. You must provide the correct password to enable communications between the new Management Agent and the Sockets Layer (SSL)-enabled OMS.


Summary Screen

This screen displays a summary of the options that you have selected during the installation process. Verify that the Source and Oracle Home values are correct and click the "Install" button.


Execute Configuration Scripts

After the install and link phase, the Oracle Universal Installer will present the "Execute Configuration Scripts" dialog specifying that the /u01/app/oracle/product/agent10g/root.sh script be run as the root UNIX user account.

If the target database is clustered using Oracle RAC, run the /u01/app/oracle/product/agent10g/root.sh script as the root UNIX user account on all nodes in the cluster.


Configuration Assistants

After running the "root.sh" script and acknowledging the dialog window, the Oracle Universal Installer will start running the three core configuration assistant tasks. This is a crucial step in the installation process as it performs the patching required for Management Agent 10.2.0.5 and also automatically configures the discovered targets with the Oracle Management Service (OMS).


End of Installation

After successfully installing and configuring Oracle Management Agent, the Oracle Universal Installer will present the "End of Installation" screen.



Post Installation Tasks

Verify the new Management Agent installation and configuration was successful by performing the following post installation tasks.


Verify Agent Status

Verify the status of the agent and check to ensure the agent can upload data regarding its targets to the Oracle Management Service (OMS):
[oracle@vmlinux1 ~]$ emctl upload agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully


[oracle@vmlinux1 ~]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /u01/app/oracle/product/agent10g
Agent binaries    : /u01/app/oracle/product/agent10g
Agent Process ID  : 3563
Parent Process ID : 3538
Agent URL         : https://vmlinux1:3872/emd/main/
Repository URL    : https://oemprod:1159/em/upload
Started at        : 2009-05-12 00:19:45
Started by user   : oracle
Last Reload       : 2009-05-12 00:19:45
Last successful upload                       : 2009-05-12 00:42:33
Total Megabytes of XML files uploaded so far :    10.30
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    23.75%
Last successful heartbeat to OMS             : 2009-05-12 00:41:53
---------------------------------------------------------------
Agent is Running and Ready


Verify DBSNMP Account is Not Locked

Verify the DBSNMP Oracle database account on the target database (TESTDB1) is not locked:
[oracle@vmlinux1 ~]$ . oraenv
ORACLE_SID = [agent10g] ? TESTDB1
[oracle@vmlinux1 ~]$ sqlplus dbsnmp@TESTDB1

SQL*Plus: Release 10.2.0.4.0 - Production on Tue May 12 00:39:44 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter password: xxxxxx

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options


If the DBSNMP Oracle database account is locked for any reason, unlock it:
SQL> alter user dbsnmp account unlock;

User altered.


Configure New Database Instance Target in Grid Control Console

  1. Login to the Oracle Grid Control Console. Note the one configuration error () under the "All Targets Alerts" section:
  2. Click on the "Targets" tab and scroll down through the list of hosts to the entry for the hostname you recently installed (vmlinux1). If the link doesn't appear, click the refresh button periodically until the host appears.
  3. Once the link for the host appears, click on the link and proceed to the "Targets" link. Configure the target database instance by selecting the $ORACLE_SID.$DOMAIN_NAME entry:
  4. From the target database page, click the "Configure" button.
  5. Enter the password for the DBSNMP user on the target database and click on the "Test Connection" button to ensure the database user DBSNMP is correctly configured for the target database being added. If, as the figure below shows, the test is successful, click "Next".

  6. On Screen 5 of 5, click the "Submit" button to configure the target database being added. After several seconds, you should see the results screen indicating the configuration for the database has been successfully updated.



About the Author

Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, capacity planning, database security, and physical / logical database design in a UNIX, Linux, and Windows server environment. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 16 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science.


Copyright (c) 1998-2010 Jeffrey M. Hunter. All rights reserved.

All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.

I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Friday, 30-Oct-2009 13:36:56 EDT
Page Count: 10934