Displaying posts published in

March 2009

Backup Report on SQL SERVER Databases

The Following Script will output the List of Databases in the SQL server and gets the Last Date the Databases were backed up select Convert(Varchar(25),server_name) as ‘Server Name’ ,convert(varchar(25),database_name) as ‘Database’ ,max(backup_finish_date) as ‘Last_backup_date’ from msdb..backupset Where database_name in (select name from master..sysdatabases) and server_name = @@servername group by server_name,database_name order by Last_backup_date DESC