次の方法で共有


Alert.CountResetDate プロパティ

警告発生回数を 0 にリセットする日付を取得します。値の設定も可能です。

名前空間:  Microsoft.SqlServer.Management.Smo.Agent
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property CountResetDate As DateTime 
    Get
'使用
Dim instance As Alert 
Dim value As DateTime 

value = instance.CountResetDate
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public DateTime CountResetDate { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property DateTime CountResetDate {
    DateTime get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member CountResetDate : DateTime
function get CountResetDate () : DateTime

プロパティ値

型: System.DateTime
イベント発生回数を 0 にリセットする日付を示す DateTime オブジェクトの値です。

説明

SQL Server エージェント警告発生回数は、特定の日付と時刻以降に警告が発生した回数を表します。 CountResetDate プロパティは、日付と時刻を指定するために使用されます。 発生回数を 0 に設定し、CountResetDate プロパティを現在の日付と時刻に設定するには、ResetOccurrenceCount メソッドを使用します。

使用例

SQL Server エージェントでの自動管理タスクのスケジュール設定

関連項目

参照

Alert クラス

Microsoft.SqlServer.Management.Smo.Agent 名前空間

その他の技術情報

管理タスクの自動化 (SQL Server エージェント)

sp_add_alert (Transact-SQL)