Operating System - HP-UX
1836992 Members
2057 Online
110111 Solutions
New Discussion

Re: Oracle Monitorint Scripts

 
Brent W. Moll
Advisor

Oracle Monitorint Scripts

How do I configure MC/Serviceguard NOT to fail over to a secondary node if the Oracle monitoring script fails or goes down?
2 REPLIES 2
Tom Geudens
Honored Contributor

Re: Oracle Monitorint Scripts

Hi Brent,
This may sound like a foolish answer, but if you do NOT want Oracle to failover, you shouldn't put it in a package in the first place. Run it locally ...
Or am I missing your point here ? Please explain what it is exactly that you want to achieve ...

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Rich Wright
Trusted Contributor

Re: Oracle Monitorint Scripts

I assume that you want a way to do Oracle maintenance without SG interference.

In your .cntl file you should have your Oracle monitoring script defined in this section ...
# SERVICE NAMES AND COMMANDS.
# Specify the service name, command, and restart parameters which are
# used by this package. Uncomment SERVICE_NAME[0]="", SERVICE_CMD[0]="",
# SERVICE_RESTART[0]="" and fill in the name of the first service, command,
# and restart parameters. You must begin with SERVICE_NAME[0], SERVICE_CMD[0],
# and SERVICE_RESTART[0] and increment the list in sequence.
#
# For example:
# SERVICE_NAME[0]=pkg1a
# SERVICE_CMD[0]="/usr/bin/X11/xclock -display 192.10.25.54:0"
# SERVICE_RESTART[0]="" # Will not restart the service.
#
# SERVICE_NAME[1]=pkg1b
# SERVICE_CMD[1]="/usr/bin/X11/xload -display 192.10.25.54:0"
# SERVICE_RESTART[1]="-r 2" # Will restart the service twice.
#
# SERVICE_NAME[2]=pkg1c
# SERVICE_CMD[2]="/usr/sbin/ping"
# SERVICE_RESTART[2]="-R" # Will restart the service an infinite
# number of times.
#
# Note: No environmental variables will be passed to the command, this
# includes the PATH variable. Absolute path names are required for the
# service command definition. Default shell is /usr/bin/sh.
#
...
so you might have ...
SERVICE_NAME[0]="Oracle_Monitor"
SERVICE_CMD[0]="/etc/cmcluster/oraclepkg/oraclepkg.sh monitor"
SERVICE_RESTART[0]=""
...
Then in oraclepkg.sh
there should be a loop that checks the DB status every few seconds.
In this monitor loop, you probably runs an Oracle control script that checks the status.
This Oracle control script can now check a control file to see if you want failover to occur or not.

Then when you want to do maintenance, you change the monitor option in the control file. Do your maintenance. Then change the control file option back when you are finished.

I'm sure there are many ways to do what you want.
I hope this makes sense, I tried not to make it too complicated.
This solution has worked good for us.

Rich