Operating System - HP-UX
1837305 Members
3471 Online
110115 Solutions
New Discussion

service to monitor oracle instance in package

 
SOLVED
Go to solution
kenken_3
Regular Advisor

service to monitor oracle instance in package

I am configuring the package to start and stop the oracle instance in a 2 node mc service guard. I don't have the extra toolkit installed.

Initially, I just leave those service entry empty like this:
SERVICE_NAME[0]=ora_pkg
SERVICE_CMD[0]=””
SERVICE_RESTART[0]=””

then put the db start and stop scripts into the function customer_defined_run_cmds and function customer_defined_halt_cmds respectively.

then I find out my db started then stopped immediately and my package started and halted immediately. After I read through the forums, I realized that I need to put monitoring script into SERVICE_CMD to keep monitoring the db instance.

Could someone explain to me why it behaved like that? If possible, any one can provide me a simple monitoring script for the oracle instance?

thanks a lot
wang & wang
2 REPLIES 2
Steven E. Protter
Exalted Contributor
Solution

Re: service to monitor oracle instance in package

Shalom,

Your entries for SERVICE_CMD and SERVICE_RESTART have unreadable characters on the end.

Your package behaved like it did due to an error in the start and stop commands. Probably placement, you probably have the start and stop running sequentially.

I'd suggest uploading the package control script.

To properly monitor your database you have two choices:
Bad choice: process monitoring. A simple ps -fu oracle or ps -ef | grep oracle

Why is it a bad choice? Because the database can halt and leave the processes running.

Better choice: A sql script run in batch mode to log onto the database with sqlplus and do a simple read of a table, even dual is sufficient.

If the read suceeds the database is running.

You need to watch the frequency with which you run it because the processes can back up causing a performance issue.

These links may be of help in creating or finding decent monitor code:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1000669

http://www.education.hp.com/datasheets/h4310s.pdf

http://techsolutions.hp.com/en/T1859-90043/ch03s19.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kenken_3
Regular Advisor

Re: service to monitor oracle instance in package

Protter,

You are right. Once I commented out those service entries, the package works as I expected.

Do you know how this Service_CMD affect the package behavior when it detects that the the db instance is not normal.

thanks,
wang & wang