次の方法で共有


Alert.NotificationMessage プロパティ

発生中の警告に応答して送信される通知に追加する、ユーザー指定のテキストを取得します。値の設定も可能です。

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

構文

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

value = instance.NotificationMessage

instance.NotificationMessage = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public string NotificationMessage { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property String^ NotificationMessage {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member NotificationMessage : string with get, set
function get NotificationMessage () : String 
function set NotificationMessage (value : String)

プロパティ値

型: System.String
通知に追加するユーザー指定のテキストを示す String 値です。

説明

Microsoft SQL Server 警告が発生すると、SQL Server エージェントはメッセージを作成し、応答として通知を送信します。 通知メッセージは、既定の要素とユーザー指定パラメーターで作成されます。 警告にユーザー指定のテキストを追加するには、Alert オブジェクトの NotificationMessage プロパティを設定します。

使用例

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

関連項目

参照

Alert クラス

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

その他の技術情報

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

sp_add_alert (Transact-SQL)