Applications Systems

Create an alert on SQL Database Mirroring Status

This article discusses on how to create an alert for SQL Database Mirroring Status

First published date

10/10/2018 7:24 PM

Last published date

10/2/2019 5:57 AM

Overview

How to create an alert for SQL Database Mirroring Status using a custom query.

NOTE: This article is for informational purposes only. Solarwinds Support cannot assist with custom SQL alerts.
The following steps will detail how you can create an alert based on the Database Mirroring Status when monitoring the SQL via AppInsight for SQL.

Product section

Server Application Monitor

Resolution

  1. Open Alert Manager via Settings > Manage Alerts.
  2. Create a new alert.
  3. In the Trigger Conditions, specify the following:
    I want to alert on: Custom SWQL Alert (Advanced)

    Set up your SWQL condition:
    AppInsight for SQL: Database
    SELECT SqlDatabase.Uri, SqlDatabase.DisplayName FROM Orion.APM.SqlDatabase AS SqlDatabase
    INNER JOIN Orion.APM.SqlDatabaseMirroring as Mirroring ON SqlDatabase.DatabaseID=Mirroring.DatabaseID
    WHERE Mirroring.State != '4'

Disclaimer: This article is for informational purposes only. Solarwinds Support cannot assist with custom SQL alerts.
The following steps will detail how you can create an alert based on the Database Mirroring Status when monitoring the SQL via AppInsight for SQL.
Any further customization can be queried through our Thwack Community.