standby rfs check script

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

standby rfs check script

rafiki
Hi Erman,

I hope you have a nice week.I want to check our standby log shipping with query and query should send a mail like 2 archives still not transffered to standby.Do you have any query like this?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: standby rfs check script

ErmanArslansOracleBlog
Administrator
You can send email using UTL_SMTP or using a bash script. (or using any other tool that can speak SMTP..)
The query that you are looking for is a well known query and you can write it yourself.

check the Core DBA scripts page for some standby check query examples:

http://ermanarslan.blogspot.com.tr/p/core-dba-scripts.html 


Reply | Threaded
Open this post in threaded view
|

Re: standby rfs check script

rafiki
i guess it does not work by the way;

select (CASE WHEN to_char(count(sequence#)) = '0'
THEN 'no problems/no gap in transfer' ELSE 'There are '||to_char(count(sequence#))|| ' archives, still not transffered to standby' END ) as "TRANSFER GAP CONTROL"
from
(select sequence#
from v$archived_log
where standby_dest='NO' --and sequence# > 81302
minus
select sequence#
from v$archived_log
where standby_dest='YES'
minus
select min(sequence#) from v$archived_log);
Reply | Threaded
Open this post in threaded view
|

Re: standby rfs check script

ErmanArslansOracleBlog
Administrator
1) Why is it not working?

2) Read this for a general overview about the checks  ->

http://ermanarslan.blogspot.com.tr/2015/12/rdbms-standby-database-analysis.html