Reputation: 8395
I need a consistent way to monitor databases that are read-only log shipped copies of production databases. In the past I have relied on the following methods:
Although the above methods work, they can't be implemented for every log shipped database that I query for various reasons. What is the best method for monitoring the "data as of" date for a log shipped database?
Upvotes: 1
Views: 553
Reputation: 294227
You have all the information you need in the Backup and Restore tables:
Upvotes: 2
Reputation: 8395
One possible solution that seems promising to me is to use the "Last Database Log Backup" and "Last Database Backup" fields in the General tab of the "Database Properties" window. Does anyone know where this data is stored or a command that will return the value for a database? Unfortunately I can't run a trace on any servers with log shipped databases here due to permission issues. Also, are these dates the "data as of" date of the backups and logs or just the time at which the backups and logs were applied on the server? Obviously the latter wouldn't help me much.
Upvotes: 0