Wich Database version was restored?

  • Hello,

    we have an external Data Center hosting sql server 2005.

    We asked yesterday evening to restore the DB from Tuesday morning and the hosting guys restored the wrong one (monday evening). This create a huge problems.

    My question is: how could we know wich version was restored?

    Is there a way to know that?

  • I don't know a way to tell other than from data. Of course you may be stuck because your host may only do nightly full backups so Monday night was as close as they could get.

  • Yep, try this:

    select backup_start_date

    from msdb.dbo.restorehistory h

    join msdb.dbo.backupset s on s.backup_set_id = h.backup_set_id

    where destination_database_name = 'the name of the database you want to check'

    order by restore_date desc

    That will return the backup_start_date (most recent first) of all restores that have occurred for the given database name. You can also get other useful stuff from both those tables if you want.

  • Thank you Karl, it works fine!

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

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