http://www.sqlservercentral.com/blogs/sql_awesomesauce/2012/08/16/quick-tip-accurate-log-shipping-status/

Printed 2014/04/19 06:25AM

Quick Tip: Accurate Log Shipping Status

By Jen McCown, 2012/08/16

Here’s a quick reminder for those of you using log shipping, and checking the SSMS report “Transaction Log Shipping Status” to assure you that your log shipping is up to date: that report is not always accurate. (I’m looking right now at a report that claims Database1 hasn’t been restored on the target server in 5 months. Actually, it was last restored 7 minutes ago. Someone who reads this blog will, I’m sure, tell me why this is so on a pair of SQL Server 2008 R2 RTM servers.)

If you want the most accurate data on your shipped logs, check the system table log_shipping_secondary_databases in MSDB, on the target server:

USE msdb ;
GO
SELECT secondary_database
, last_restored_file
, last_restored_date
FROM log_shipping_secondary_databases
WHERE secondary_database = 'MyDatabase' ;

As you were!

Jen McCown
MidnightDBA.com/Jen

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.