Is it possible to query the last successful backup date (and perhaps the type of backup) of each database in SQL Sever 2008 R2?
Tell me more
×
Database Administrators Stack Exchange is a question and answer site for
database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
|
Try this:
|
|||||||||||||||
|
|
Yes, as long as the history data is still in msdb database. The following block of code will get your the last 100 backups including full, differential and log backups.
|
||||
|
|
|
If you want to use Powershell this is what I have. If you have SQL 2008 SMO DDLs on your computer use line 1. If you have SQL 2005 SMO delete line 1, remove the # and use line 2. If all else fails delete both lines 1 and 2, remove the # and use line 3. Replace Your_Server_Name_Here with the name of the server you're checking.
|
|||
|
|