RE: monitor rac database services

  • From: D'Hooge Freek <Freek.DHooge@xxxxxxxxx>
  • To: Yong Huang <yong321@xxxxxxxxx>, "coskan@xxxxxxxxx" <coskan@xxxxxxxxx>
  • Date: Thu, 16 Jun 2011 07:44:52 +0200

Oh well, time to practice my skills with cut and awk  ;-)


Kind regards,

 
Freek D'Hooge
Uptime
Oracle Database Administrator
email: freek.dhooge@xxxxxxxxx
tel +32(0)3 451 23 82
http://www.uptime.be
disclaimer: www.uptime.be/disclaimer

-----Original Message-----
From: Yong Huang [mailto:yong321@xxxxxxxxx] 
Sent: woensdag 15 juni 2011 23:13
To: D'Hooge Freek; coskan@xxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: monitor rac database services

> I know the script, but I don't think it takes the target state of 
> the service in account. Which means an alert would be given if a 
> service is down, even if the target state for that service on that 
> node is "offline".

That's correct. I wrote the script 
(http://yong321.freeshell.org/oranotes/Service.txt) originally for 
10g and it works for 11g too, but it doesn't consider TARGET, i.e. what 
clusterware thinks it should be online or offline, because my DBA 
group is only interested in STATE, as well as whether the service is 
running on its preferred instances.

As far as I know, in 10g, only crs_stat shows TARGET. In 11g, both that 
and "crsctl stat res" have that. But in 11g RAC, crs_stat is no longer 
reliable about service statuses (for example, after you stop a service 
with dbms_service.stop_service, or crash the instance, crs_stat still 
says it's ONLINE). The preferred command "crsctl stat res -t" (or 
without -t) is reliable. I'm not aware of any way to get TARGET from 
inside database. Although x$kswsastab, base table of v$(active_)services, 
has a few columns not exposed, I doubt it has TARGET; they may be some 
less commonly used attributes as shown in "srvctl config service" in 11g. 
But I could be wrong.

I thought all this info was in OCR. But ocrdump, even run as root to dump 
everything, doesn't have it. Also checked the output of "ocrconfig -export".

Yong Huang
--
//www.freelists.org/webpage/oracle-l


Other related posts: