Home » sql server »sqlserverpedia-syndication »SSC »Tips » Currently Reading:

Quick Tip: Accurate Log Shipping Status

August 16, 2012 sql server, sqlserverpedia-syndication, SSC, Tips No Comments

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 ;
SELECT secondary_database
, last_restored_file
, last_restored_date
FROM log_shipping_secondary_databases
WHERE secondary_database = 'MyDatabase' ;

As you were!

Jen McCown

Comment on this Article:

Release Date: Minion by MidnightDBA

Just 3 days 1 hour 17 minutes 27 seconds until we release Minion Redindex: index maintenance done right!

MidnightSQL Consulting

Need help? Got an emergency? Write us at Support@MidnightDBA.com!

We can schedule time to help with your backup/restore issues, high availability and disaster recovery setup, performance problems, and a great deal more. Very often, we're even available on the moment for downtime issues and emergencies.

For more information about MidnightSQL consulting, email us or check out www.MidnightSQL.com. Happy days!

Where are We?

November 3-7: PASS Summit, Seattle, WA

PASS Summit: Jen is presenting How to Interview a DBA: A Panel Debate on Thursday 11/6 1:30pm, room 401 (along with Adam Machanic, Sean McCown, Bob Pusateri, and Michelle Ufford).

PASS Summit: Sean is presenting Performance Tuning Your Backups on Wednesday 11/5 3:00pm, room 602-604.

December 11: Presenting "Powershell Cmdlets.." at Alaska SQL Server User Group

January 30: "Become an Enterprise DBA" precon at Austin SQL Saturday

Blog Posts by Category


How to Eat Pop-tarts
Watch DBAs@Midnight live on Fridays,m 11pm Central time

The best database career advice you’ve never heard!


The DBA Roadmap Seminar is 7 MP3 tracks (over 5 hours!) of insider guidance on your database career. We'll teach you how and what to study as a DBA, weigh in on controversial resume debates, teach you to recognize a worthy recruiter, and discuss the new professionalism of interviews. Also some bonus materials, PDF companion guides, and really spiffy intro music!

Once your $99 PayPal payment is submitted, you'll get the download link in e-mail! (Download is a 370Mb ZIP file.)

Become a DBA. Become a BETTER DBA. Use the Roadmap.

Visit www.DBARoadmap.com for info, forums, and more!

Add to Cart View Cart

Cunningham’s Law

"The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer."
Relevant: http://xkcd.com/386/