Search

Wednesday, July 27, 2011

Script to Check the Backup History

use msdb;
SELECT backupset.database_name,backupset.backup_start_date,backupmediafamily.physical_device_name,(backupset.backup_size/1024)/1000 as size
FROM backupset,backupmediafamily where backupset.media_set_id = backupmediafamily.media_set_id
and datediff(dd,backupset.backup_start_date,getdate()) < 30 and type='l'
order by backupset.database_name,backupset.backup_start_date desc

i=diff
l=log
d=full

No comments:

Post a Comment