May 24, 2011 at 12:00 pm
is there a way to tell how many logs is sql server standby behind on?
thanks
May 24, 2011 at 10:59 pm
sqlstar2011 (5/24/2011)
is there a way to tell how many logs is sql server standby behind on?thanks
It is very tricky one for me . I have tried different combination finally did something which could of some use for you. I am not sure that this is a good way of identifying it but you can definitely get some inputs about the last log which is applied on the secondary server.
run this script on standby server
select max(backup_set_id) from msdb..restorehistory where destination_database_name ='sachin1'
run this script on primary server
select backup_start_date,backup_finish_date,type,database_name
from msdb..backupset
where backup_set_id =<the result of first script>
😎 may be it could help you...
Regards,
Sachin Sharma
May 25, 2011 at 8:00 am
I am not sure how is this useful.. may be I am missing something. I get a result of 5001 from first query. When I use that in second query it returns with a name of database that has nothing to do with the log shipping. what am I missing?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply