Oracle Grid Control

Installing Grid Control

I am going to confess that setting up Oracle Grid Control was no easy task, I do think that the Oracle documentation is not an easy read, they really need a quick setup guide.

Firstly the Virtual Machine needs to be a bit more powerful and you do require more disk space, I have allocated 50GB, this will allow me to install and keep the installation binaries. Again I have prepared the Linux server in the same way as the primary database server, I also used the oracle-validated RPM to prepare the server for Oracle.

Prepare Oracle using oracle-validated

## as root
cd /etc/yum.repos.d

## Edit the downloaded repo file and enable any of the sections you require

## install oracle-validated
yum list
yum install oracle-validated

I am not going to explain in detail how to setup grid control but point you to some sites that have already done this, but I will highlight some of the pitfalls I encountered, firstly GRID control is very picky on what versions you use, so don't go getting the latest versions of everything. I spent nearly 4 days wondering why I could not install grid as it kept crashing during the OMS configuration section with "network address port issues" it turned out that I was using the wrong version of weblogic, so read the documents and make sure all the version are supported, I used the following

Again make sure you use compatible versions otherwise you will be in a world of pain and many late nights. Use the links below and just follow them and the installation of grid will go smoothly.

Just to recap the steps I took are the following

  1. Make sure the VM has lots of resources (2 CPUS, 2.5GB RAM and at least 50GB hard disk space, swap was double memory)
  2. Install Linux as normal, no firewall or SELinux
  3. Prepare the Linux for Oracle using the Oracle-validated RPM
  4. using YUM install the libaio-devel and unixODBC-devel libraries
  5. Download all the required software onto the VM, I put in all /home/oracle/stage (see above for required software)
  6. Install Oracle Weblogic (use above links on how to do this, make sure you have the right version)
  7. Install Oracle Database (I selected all the default options)
  8. Apply the necessary database changes (see above links on what you need to change)
  9. At this point I rebooted the server to clear everything down
  10. Install Grid Control (use above links on how to do this, this took about 45 minutes to install)
  11. To access grid browse to the following http://<server name>:7799/em and login as system

Hopefully you should then have a running Grid Control server, I created the below scripts to allow me to have control over starting and stopping Grid for the primary database , I removed all startup/shutdown scripts from /etc/rc*.d and /etc/init.d.

startup script

## Edit the /etc/oratab file and change the database line to a Y
## The startup script is as follows




echo "Starting ASM"
echo "============"
$GRID_HOME/bin/srvctl start asm

echo ""
echo ""

echo "Starting Oracle Database"
echo "========================"
$GRID_HOME/bin/srvctl start database -d PROD1

echo "Starting Grid Agent"
echo "========================"
$AGENT_HOME/bin/emctl start agent

shutdown script

## The shutdown script is as follows




echo "Stopping Grid Agent"
echo "========================"
$AGENT_HOME/bin/emctl stop agent

echo "Stopping Oracle Database"
echo "========================"
$GRID_HOME/bin/srvctl stop database -d PROD1

echo ""
echo ""

echo "Stopping ASM"
echo "============"
$GRID_HOME/bin/srvctl stop asm -f

I personally like to start and stop the whole server just to make sure I am confident in shutdown and restarting the server and see that everything starts correctly.

On a final note Oracle really should make this whole process a lot easier, it really does harp back to the old days where you are holding your breath to get things working hoping that everything goes smoothly, I spent 4 very frustrating days getting this whole process right and searching the web for documentation, a better idea would be to create a whole virtual VM that you could just install in your ESX server, especially as Oracle now has all the components including the O/S.

Grid Control Agents

Now that we have a Grid control server running we need to install the grid agent on our all our servers. Download and unzip the Oracle Grid Control Agent onto each server, once this is done we will be using the silent and responseFile options to install the agent, this means we have to create a responseFile


## Edit the file, I have changed the below options only


Note: this is a link to the whole responseFile

Once you have the responseFile configured use the following command to install the agent, use your path on where you placed you response file

install the Grid Agent cd /home/oracle/stage/grid_agent/linux_x64/agent
./runInstaller -silent -responseFile /home/oracle/stage/grid_agent/linux_x64/response/first_response.rsp

Once that has been completed you need to run the below as run, this will set some permission on some of the agent files, you may have to change the path depending on where you installed the agent

run as root

cd /u01/app/oracle/product/agent11g/agent11g

The install seemed to go all ok, but the final message stated that it failed, If you received this message then follow the below steps to clear everything down and restart the agent, hopefully the agent should hook into the Grid control server

cleardown and restart the agent

emctl stop agent

## delete all the files in $AGENT_HOME/sysman/emd/upload
## delete all the files in $AGENT_HOME/sysman/emd/state

rm -f $AGENT_HOME/sysman/emd/upload/*
rm -f $AGENT_HOME/sysman/emd/state/*

emctl clearstate agent
emctl secure agent (you will be asked for the secure password)
emctl start agent

Again I think that this process should be a whole lot easier.