Link to home
Start Free TrialLog in
Avatar of Kamal Agnihotri
Kamal AgnihotriFlag for United States of America

asked on

Script for Monitoring Data Guard

Hi Experts,

I would like a Unix shell script that would run the SQL below to run via a cron job every hour.  

SELECT TYPE, STATUS, HIGH_SCN    FROM V$LOGSTDBY;

no rows selected

If the query returns, "no rows selected" then I know for sure that Data Gurad has stopped. If the query returns, "no rows selected" , then I would like an e-mail trigerred to inform the DBAs that Data Guard has stopped.


ASKER CERTIFIED SOLUTION
Avatar of sridharv9
sridharv9
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
perfect script solution
Avatar of Kamal Agnihotri

ASKER

Hi  sridharv9 ,
Excellent. And it worked.
Thanks a lot sridharv9

Sincerely,

Kamal Agnihotri