次の方法で共有


Alert.IsEnabled プロパティ

警告が有効かどうかを示す Boolean プロパティ値を取得します。値の設定も可能です。

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

構文

'宣言
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property IsEnabled As Boolean 
    Get 
    Set
'使用
Dim instance As Alert 
Dim value As Boolean 

value = instance.IsEnabled

instance.IsEnabled = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public bool IsEnabled { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property bool IsEnabled {
    bool get ();
    void set (bool value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member IsEnabled : bool with get, set
function get IsEnabled () : boolean 
function set IsEnabled (value : boolean)

プロパティ値

型: System.Boolean
警告が有効かどうかを示す Boolean 値です。True の場合、警告は有効なので、指定したイベントまたはパフォーマンス条件が発生すると警告が発生されます。False (既定値) の場合、警告は無効なので、イベントまたはパフォーマンス条件に一切応答しません。

使用例

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

関連項目

参照

Alert クラス

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

その他の技術情報

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

sp_add_alert (Transact-SQL)