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
 General SQL Server Forums
 New to SQL Server Administration
 backup file

Author  Topic 

WoodHouse
Posting Yak Master

211 Posts

Posted - 2009-10-27 : 07:45:46
Hi

how do prove that we did the restore from the correct backup file?


Thanks

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-27 : 08:13:51
Check the SQL Error Log.

Query these tables in MSDB:
- restorefile
- restorehistory
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-10-27 : 08:29:32
Hi

try this...


SELECT rs.destination_database_name,

bs.database_name as source_database_name,

rs.restore_date,

bmf.physical_device_name as backup_file_used_for_restore,

bs.User_Name,

server_name,

machine_name,

bs.backup_start_date,

bs.backup_finish_date,

database_creation_date,

backup_size

FROM msdb..restorehistory rs

INNER JOIN msdb..backupset bs

ON rs.backup_set_id = bs.backup_set_id

INNER JOIN msdb..backupmediafamily bmf

ON bs.media_set_id = bmf.media_set_id

ORDER BY rs.restore_date DESC





-------------------------
R...
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-28 : 12:26:43
Or if the database is a SQL Server 2005 database the in SSMS right click the database in question - Reports - Backup and Restore events

Then expand the Sucessful restore operations and in the backupname column it will show you the name of the backup file used.
Go to Top of Page
   

- Advertisement -