ResetOccurrenceCount Method

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

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

Syntax

object
.ResetOccurrenceCount(
)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

Prototype (C/C++)

HRESULT ResetOccurrenceCount();

Remarks

The ResetOccurrenceCount method:

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

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

Applies To:

Alert Object

See Also

Reference

CountResetDate Property
OccurrenceCount Property
LastOccurrenceDate Property

Help and Information

Getting SQL Server 2005 Assistance