Export (0) Print
Expand All
Expand Minimize

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.

object.ResetOccurrenceCount()

object

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

HRESULT ResetOccurrenceCount();

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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft