0
(0)

Below query can be used to check last full, differential and transaction log backup times in SQL Server.

SELECT sd.[Name] AS DatabaseName,
LastFullBackUpTime=(SELECT MAX(bs.backup_finish_date) FROM msdb.dbo.backupset bs WHERE
bs.[database_name]=sd.[name] AND bs.[type]='D'),
LastDiffBackUpTime=(SELECT MAX(bs.backup_finish_date) FROM msdb.dbo.backupset bs WHERE
bs.[database_name]=sd.[name] AND bs.[type]='I'),
LastLogBackUpTime=(SELECT MAX(bs.backup_finish_date) FROM msdb.dbo.backupset bs WHERE
bs.[database_name]=sd.[name] AND bs.[type]='L')
FROM sys.databases sd
ORDER BY 1;
GO

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.