Share via


ResetOccurrenceCount Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

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

구문

object.ResetOccurrenceCount()

Parts

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

Prototype (C/C++)

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.

Applies To: