Share via


SDKAlertsAndEventsView

SDKAlertsAndEventsView correlates each alert to the event that caused it. The relationship between events and alerts is not always a simple one-to-one cause and effect relationship. Although an alert must have at least one event, several events might be associated with a single alert. This is the case when several similar events, called an event storm, are consolidated by MOM. More than one alert can be raised by a single event.

The alert and event GUIDs can be used to identify and correlate specific alerts and events from other views, such as SDKAlertView, SDKEventView, and SDKAlertsAndEventsView.

The following table describes the columns of SDKAlertsAndEventsView.

Column SQL Server type Null values allowed? Description

EventGUID

uniqueidentifier

No

The GUID of the event.

AlertGUID

uniqueidentifier

No

The GUID of the alert raised by the event in the EventGUID column.

Examples

The following example shows how to query the SDKAlertsAndEventsView view for the GUIDs of all events that raised the specified alert.

SELECT SDKAlertsAndEventsView.EventGUID
FROM SDKAlertsAndEventsView
WHERE SDKAlertsAndEventsView.AlertGUID = '25764A13-6EE5-46DF-B19B-058C0A0A25BA'

The following example shows how to query the SDKAlertsAndEventsView view for the GUIDs of all alerts that were raised by the specified event.

SELECT SDKAlertsAndEventsView.AlertGUID
FROM SDKAlertsAndEventsView
WHERE SDKAlertsAndEventsView.EventGUID = '4D0A2E31-207D-48D7-BC6F-5338651C0EE9'

The following example shows how to query the SDKAlertsAndEventsView view for all events that raised the specified alert. In this example, the query is sent to the computer running SQL Server using ADO in VBScript.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' GetAllEventsForAlert
''
'' Returns an ADO recordset of all Events related to the Alert
'' specified by the strAlertGUID parameter.
Function GetAllEventsForAlert(strAlertGUID, strConn)
    Dim conMOMDB
    Dim recAlertsAndEvents
    Dim strSQLQuery

    Set conMOMDB = CreateObject("ADODB.Connection")
    Set recAlertsAndEvents = CreateObject("ADODB.Recordset")

    strSQLQuery = "SELECT EventGUID FROM SDKAlertsAndEventsView " & _
                  "WHERE AlertGUID='" & strAlertGUID & "'"

    Call conMOMDB.Open(strConn)
    Call recAlertsAndEvents.Open(strSQLQuery, conMOMDB)

    Set GetAllEventsForAlert = recAlertsAndEvents
End Function

Requirements

Platforms: Requires Windows 2000 Server or later

Version: Requires MOM 2000 SP1 or later

Database: OnePoint (MOM 2000 SP1 or later) or SystemCenterReporting (MOM 2004 or later)

See Also

MOM SQL Views