Database backup (system dbs)


Job details

Name: Database backup (system dbs)
Platform: Sqlserver
Category: Availability
Description: This procedure analyzed the system database backups statistics from msdb.dbo.backupset table.
Long description:
Version: 1.1
Default schedule: 05 6 * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version = ‘2000′ & hasengine=‘YES’ & alwayson_active=‘NO’ & engine_edition = ‘Microsoft SQL Server’]

Parameters

Name Default value Description
warning threshold 168 A warning is triggered if the amount of hours (default 168 hours – 1 week), since the system database have been backed up,

Job Summary

SELECT msdb.dbo.backupset.database_name, MAX(msdb.dbo.backupset.backup_finish_date) AS last_db_backup_date FROM msdb.dbo.backupset WHERE msdb.dbo.backupset.type = 'D' and database_name in ('master','model','msdb') GROUP BY msdb.dbo.backupset.database_name;

Implementation Details

The monitoring job utilizes a stored procedure named “dbw_sys_backup_proc” that executes several checks:

The procedure includes logic to perform these checks and update the monitoring system with details about any issues found. The outputs include:

Additionally, the procedure records the status (backed up/not backed up) and provides a detailed message describing either the last backup time or the absence of backup.

Reporting

The job generates reports showing:

  1. “System databases backup statistics”
  2. Details and statistics for last backups of the system databases.
  3. Highlighting system databases with backups that are older than 48 hours.
  4. Any system database missing in backup records.

The reports include tables and visual presentations to easily identify and understand the backup status of each system database. Columns in these reports display various information such as database name, last backup date, and backup age.

The provided implementations and reporting ensure ongoing surveillance of the backup health of key databases, essential for maintaining corporate standards of data aversion and database management efficiency.

Dependencies and Scheduling

Maintaining a routine check via this job aids in preempting potential risks associated with the lack of timely database backups, reinforcing data protection strategies for the organization.