Tuesday, April 30, 2013

How to: find when the database last got restored?

 

   1:  SELECT destination_database_name,max(restore_date) as restore_date


   2:  FROM msdb.dbo.restorehistory 


   3:  WHERE destination_database_name = 'testDB’  ---- Place your database name here


   4:  GROUP BY destination_database_name




The result will look like;



destination_database_name     restore_date

testDB                        2013-04-29 11:49:19.940


No comments: