Search

Thursday, October 25, 2012

Last Backup Time of All Databases

SELECTdb.Name AS DatabaseName,
MAX
(bus.backup_finish_date) AS LastBackUpTime
FROM
sys.sysdatabases db
LEFT
OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = db.name
GROUP
BY db.Name
order
by LastBackUpTime asc

No comments:

Post a Comment