As a Database Administrator we need to take a checklist of all production servers. Apart from this we have to monitor backup file size of sql database.
Today I would like to share one script which helps to show database name, type, size of the backup file, recovery model, when the backup was started and when it finished also you will get where the backup file is reside in the server
SELECT
bs.database_name,
bs.type,
(bs.compressed_backup_size/1024)/1024 [BackupSize (MB)],
bs.recovery_model,
bf.physical_device_name,
bs.user_name,
bs.backup_start_date,
bs.backup_finish_date
FROM
msdb..backupset bs
INNER JOIN msdb..backupmediafamily bf
ON bf.media_set_id=bs.media_set_id
where type ='d' and backup_start_date between '2013-05-22' and '2013-05-23'
----------
Note: consider the below key points.
Include 'D' for getting 'Full backup'
Include 'I' for getting 'Differential backup'
Include 'L' for getting 'Log backup'
Source Also check
Today I would like to share one script which helps to show database name, type, size of the backup file, recovery model, when the backup was started and when it finished also you will get where the backup file is reside in the server
SELECT
bs.database_name,
bs.type,
(bs.compressed_backup_size/1024)/1024 [BackupSize (MB)],
bs.recovery_model,
bf.physical_device_name,
bs.user_name,
bs.backup_start_date,
bs.backup_finish_date
FROM
msdb..backupset bs
INNER JOIN msdb..backupmediafamily bf
ON bf.media_set_id=bs.media_set_id
where type ='d' and backup_start_date between '2013-05-22' and '2013-05-23'
----------
Note: consider the below key points.
Include 'D' for getting 'Full backup'
Include 'I' for getting 'Differential backup'
Include 'L' for getting 'Log backup'
Source Also check
Post a Comment