Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 the timestamp when a db was restored

Author  Topic 

nhuanlieu
Starting Member

27 Posts

Posted - 2009-06-08 : 11:34:08
Using SQL2005 SP2, is there a way to tell when a db was restored? Thanks.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-08 : 12:24:27
use msdb
go
SELECT TOP 1 * -- or without top 1
FROM RESTOREHISTORY WITH (nolock)
WHERE DESTINATION_DATABASE_NAME = 'your_db_name'
ORDER BY RESTORE_DATE DESC



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -