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:
請參閱
參考
CountResetDate Property
OccurrenceCount Property
LastOccurrenceDate Property