Re: monitor rac database services

From: Yong Huang <yong321_at_yahoo.com>
Date: Wed, 15 Jun 2011 14:13:19 -0700 (PDT)
Message-ID: <337799.10624.qm_at_web80608.mail.mud.yahoo.com>



> 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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 15 2011 - 16:13:19 CDT

Original text of this message