I would like to get a script , which can give me back...whether the last night database backup has succeeded or failed. Thanks
Try: select database_name, convert(smalldatetime,max(backup_finish_date)) as last_backup, datediff(d, max(backup_finish_date), getdate()) as days_since_last from msdb.dbo.backupset where type = 'd' --Database backup, use 'L' if you want to see the Log backups group by database_name Luis Martin Moderator SQL-Server-Performance.com All in Love is Fair Stevie Wonder All postings are provided “AS IS†with no warranties for accuracy.