Listing all databases backup

Are you sure, that you make your db backups?

CREATE VIEW ViewLastBackup AS SELECT a.name AS 'DataBase', Backup_Date, Days_since_last_Backup FROM master.dbo.sysdatabases AS a LEFT JOIN (SELECT database_name,MAX(backup_finish_date) AS Backup_Date, ABS(DATEDIFF(day,GETDATE(),MAX(backup_finish_date))) AS Days_since_last_Backup FROM msdb.dbo.backupset WHERE backup_finish_date <= GETDATE() GROUP BY database_name) AS b ON a.name = b.database_name SELECT * FROM ViewLastBackup WHERE Backup_Date IS NOT NULL ORDER BY 2 DESC,1 SELECT * FROM ViewLastBackup WHERE Backup_Date IS NULL ORDER BY 2 DESC,1

You can download it here ;)

Subscribe in Newsgator Online Weblog Suche im Netz