Database status


Job details

Name: Database status
Platform: Sqlserver
Category: Availability
Description: This alert checks if the instance has been restarted since the last check
Long description:
Version: 2
Default schedule: 5m
Requires engine install: No
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2000′ & hasengine =‘NO’ & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
ignore_databases 2 List of databases (separated by comma) which will be ignored.
return_status_value 2 Return status value (ALARM – 2, WARNING – 1, or OK – 0)

Job Summary for MS SQL Server Database Status Alert

SELECT name, dbid, CONVERT(VARCHAR(20), DATABASEPROPERTYEX(name, 'Status')) AS status FROM master.dbo.sysdatabases

Detailed Operation

** Executes every 5 minutes by default.
** Collects and evaluates the database statuses by running a query to fetch the database name and current status from the system catalog view in MS SQL.
** Databases specified in the ‘ignore_databases’ parameter are excluded from negative reporting even if their statuses are not ONLINE.

Output Tables and Details

Database Name Current Status Action
Database A OFFLINE (Ignored) No action needed, ignored
Database B ERROR Investigate and resolve

This configuration and the monitoring job design ensure proactive management of database health, thus supporting continuity and performance of business operations tied to these databases.