RESTORE HISTORY Table in MSDB
To find out restore history of databases we can use RESTORE HISTORY Table in the msdb database. We can run the below query and find out when the latest restore has happend for the particular database.
SELECT * FROM msdb.dbo.RestoreHistory
WHERE Destination_Database_Name='DatabaseName'
ORDER BY Restore_Date DESC
SELECT [restore_date] ,[destination_database_name] ,[user_name] ,[backup_set_id] ,[restore_type] ,[replace] ,[recovery] ,[restart] FROM [msdb].[dbo].[restorehistory] WHERE destination_database_name='AdventureWorks2012'
Comments