开发者

SQL Server 2005 - How to find out what transaction log files have been restored

开发者 https://www.devze.com 2022-12-24 23:16 出处:网络
How can you find out what transaction log backup files have been restored using SQL in SQL Ser开发者_运维百科ver 2005?Try;

How can you find out what transaction log backup files have been restored using SQL in SQL Ser开发者_运维百科ver 2005?


Try;

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
0

精彩评论

暂无评论...
验证码 换一张
取 消