SQL Server 2005 - 如何找出已还原的事务日志文件

时间:2010-03-30 19:25:47

标签: sql sql-server-2005 transaction-log

如何在SQL Server 2005中找出使用SQL还原的事务日志备份文件?

1 个答案:

答案 0 :(得分:4)

尝试;

select distinct r.destination_database_name, r.restore_date, 
       bs.server_name, m.physical_device_name as backup_device, b.physical_name 
from msdb.dbo.restorehistory r
      inner join msdb.dbo.backupfile b on r.backup_set_id = b.backup_set_id 
      inner join msdb.dbo.backupset bs on b.backup_set_id = bs.backup_set_id
      inner join msdb.dbo.backupmediafamily m on bs.media_set_id = m.media_set_id