Alert.ResetOccurrenceCount Method ()
Applies To: SQL Server 2016 Preview
Resets the alert occurrence count back to zero.
Namespace: Microsoft.SqlServer.Management.Smo.Agent
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
public void ResetOccurrenceCount()
public:
void ResetOccurrenceCount()
member ResetOccurrenceCount : unit -> unit
Public Sub ResetOccurrenceCount
Remarks
The ResetOccurrenceCount method:
Sets the OccurrenceCount property to 0.
Sets the date and time that specifies the start of counting to the current date and time in the LastOccurrenceDate and CountResetDate properties.
Examples
Legacy Code Example
Scheduling Automatic Administrative Tasks in SQL Server Agent
See Also
Alert Class
Microsoft.SqlServer.Management.Smo.Agent Namespace
Automated Administration Tasks (SQL Server Agent)
sp_add_alert (Transact-SQL)
Return to top