-- Last 1000 database backups performed SELECT TOP 1000 db.name "DatabaseName", bs.server_name "ServerName", bs.backup_set_id "BackupSetID", bs.name "Name", CASE bs.type WHEN 'D' THEN 'D-Database' WHEN 'I' THEN 'I-Differential' WHEN 'L' THEN 'L-Log' WHEN 'F' THEN 'F-File' WHEN 'G' THEN 'G-Differential' WHEN 'P' THEN 'P-Partial' WHEN 'Q' THEN 'Q-DifferentialPartial' ELSE bs.type END "Type", bs.backup_start_date "StartDate", DATEDIFF(mi, bs.backup_start_date, bs.backup_finish_date) "Duration(Min)", CAST(bs.backup_size/1024/1024 AS DECIMAL(11,2)) "Size(MB)", bs.user_name "UserName", CAST(bs.software_major_version AS VARCHAR(3)) + '.' + CAST(bs.software_minor_version AS VARCHAR(3)) + '.' + CAST(bs.software_build_version AS VARCHAR(5)) "SQLServerVersion" -- Uncomment the following line for additional Backup data ,bs.* FROM master.dbo.sysdatabases db INNER JOIN msdb.dbo.backupset bs ON bs.database_name = db.name WHERE bs.database_name = N'AdventureWorks' ORDER BY bs.backup_start_date desc;
Thank you for visiting! Please take a moment to register so that you can participate in discussions!