ResetOccurrenceCount Method (SQL-DMO)

The ResetOccurrenceCount method reinitializes history data for a SQL Server Agent alert.

Applies To

Alert Object

Syntax

object.ResetOccurrenceCount( )

Part Description
object Expression that evaluates to an object in the Applies To list

Remarks

The ResetOccurrenceCount method:

  1. Sets to zero the counter representing the number of times an alert has been raised.
  2. Sets the date and time marking the start of counting to the current date and time.

Alert history values are visible in SQL-DMO through the CountResetDate, LastOccurrenceDate, and OccurrenceCount properties of the Alert object.

Prototype (C/C++)

HRESULT ResetOccurrenceCount();

See Also
CountResetDate Property OccurrenceCount Property
LastOccurrenceDate Property  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.