When database was restored?

  • We have a database on a testing server which is restored every night from production. The job to restore it is scheduled not on test server but from a centralized scheduler server.

    My question is how to find out at what time database was restored ? What I mean is some sys, dm_db tables, etc ?

    Thanks

  • You can query msdb.dbo.restorehistory.

  • Thanks a lot. This is exactly what I needed.

  • +1 to above

    USE msdb

    SELECT TOP 100 *

    FROM RESTOREHISTORY WITH (NOLOCK)

    --WHERE destination_database_name IN ('XXX')

    ORDER BY restore_date DESC

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005
  • Good question with perfect answer. Thanks

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply