0
(0)

Below query can be used to find out database last restored date.

SELECT [bs].[database_name] as [source_database_name]
,[rh].[destination_database_name],
[rh].[Restore_date],
[bmf].[physical_device_name] as [Backup_file_used],
[rh].[user_name] AS [RestoredBy],
datediff(minute,bs.backup_start_date,bs.backup_finish_date) as RestoreDurationMin,
CAST(bs.backup_size/1024.0/1024 AS DECIMAL(10, 2)) AS BackupSizeMB
FROM msdb..restorehistory rh
INNER JOIN msdb..backupset bs
ON [rh].[backup_set_id] = [bs].[backup_set_id]
INNER JOIN msdb..backupmediafamily bmf
ON [bs].[media_set_id] = [bmf].[media_set_id]
where [rh].[destination_database_name]='Dbalyfe'
ORDER BY [rh].[restore_date] DESC

Sample Output:

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.