Alert.CountResetDate Property
Applies To: SQL Server 2016 Preview
Gets or sets the date on which to reset the alert occurrence count back to zero.
Namespace: Microsoft.SqlServer.Management.Smo.Agent
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
[SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)]
public DateTime CountResetDate { get; }
public:
[SfcPropertyAttribute(SfcPropertyFlags::None | SfcPropertyFlags::Standalone | SfcPropertyFlags::Matrix)]
property DateTime CountResetDate {
DateTime get();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)>]
member CountResetDate : DateTime with get
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.Matrix)>
Public ReadOnly Property CountResetDate As Date
Property Value
Type: System.DateTime
A DateTime object value that specifies the date on which to set the event occurrence count back to zero.
Remarks
The SQL Server Agent alert occurrence count represents the number of times the alert has fired after a specific date and time. The CountResetDate property is used to specify a date and time. Use the ResetOccurrenceCount method to set the occurrence count to 0 and set the CountResetDate property to the current date and time.
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