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.