top of page

Return the date of the last backups for all DBs of an MS SQL instance


Here is a handy little SQL script to find out when your databases were last backed up on an MS SQL instance.


SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),'-') AS LastBackUpTime
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
GROUP BY sdb.Name

Enjoy! ;-)

1 view

Subscribe to my newsletter • Don't miss anything !

Merci de t'être abonné !

Cookie Policy

Privacy Policy

Terms of use

Terms and conditions

© 2024 by > AlexIn Tech.

Montreux - Switzerland | alexis@alexin.tech

bottom of page