Friday, January 21, 2011

How to get, when your db was restored last time?

Suppose you have to findout when you db was restored last time and by whihc user.To get this info you have to look into a system table 'restorehistory' whihc exist in system database msdb.Run below cmds to get this info:

use msdb
select Destination_database_name AS [DB Name],user_name AS [User] ,restore_date As [Last Restore Date]
from restorehistory
where Destination_database_name like ('qa%')

Once you will run this you will get below output.


Anonymous said...

my restorehistory table has no data

Adam Gorge said...

Hello Manvendra,

Thank you for sharing on DB restoring. But the result is not showing the last time restoration information and my problem is still remain same even I have run the command, Please resolve my issue.

Manvendra said...


Can you share/elebarote your issue.I am not getting whihc type of issue you are getting? ideally when you run this cmd you will get last restore time of your dbs.