Kamal Agnihotri
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
perfect script solution
ASKER
Hi sridharv9 ,
Excellent. And it worked.
Thanks a lot sridharv9
Sincerely,
Kamal Agnihotri
Excellent. And it worked.
Thanks a lot sridharv9
Sincerely,
Kamal Agnihotri