Find out when the last restore was done to a database

Category SQL Sub Category Database State
Bookmark and Share
Looking at the properties of a database in sql server management studio does not show when the last restore had occurred. Running the following script in query analyser will.
Where DatabaseName below is the name of the database you want to check.
Copy Code
--Replace DatabaseName below with the name of the database you want to check. USE MSDB SELECT TOP 1 * FROM RESTOREHISTORY WITH (nolock) WHERE (DESTINATION_DATABASE_NAME = 'DatabaseName') ORDER BY RESTORE_DATE DESC
Share the love
Bookmark and Share