1
0
mirror of https://github.com/alex-bochkov/ssms-addin.git synced 2026-06-15 16:57:06 +02:00
Files
ssms-addin/QueryTemplates/Replication/Last restored log files SQL2005.sql
Alex Bochkov 91d9f0c5ba Files renamed
2017-09-11 07:52:50 -07:00

10 lines
495 B
SQL

select TOP 100 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
WHERE
r.destination_database_name = 'RentPayment'
ORDER BY
r.restore_date DESC