Thursday, August 2, 2012

Database Restore History

USE msdb;
GO
Select top 20
DBRestored= destination_database_name,
SourceFile= physical_name,
RestoreDate= restore_date
from RestoreHistory h
inner join BackupSet b
on h.backup_set_id = b.backup_set_id
inner join BackupFile f
on f.backup_set_id = b.backup_set_id
order by RestoreDate desc
GO

MvM

No comments:

Post a Comment