Get Latest DB Restore Details
SQL Server 2000: Tested
SQL Server 2005: Tested
SQL Server 2008: Tested
SQL Server 2008R2: Tested
SQL Server 2012: Not Tested
Date: 23 Sep 2010
22 Jan 2013 - Augmented returned columns with the date that the restore file was created by a backup.
Retrieves the last restore details for all databases on a server. Includes the file name of the backup file and the original backup dates for the file. Also included is the date that the restore file being used was created by a backup command. Useful if the file naming convention does not include any indication of the content/creation date of the backup .
Also included a variation on the query that returns only the latest restore for each DB.
Mostly useful on non-production servers where restoring copied of production databases is common.
Get all restores for all DBs:
Get latest restores for all DBs: