次の方法で共有


Alert.UpdateNotification メソッド

警告に対してオペレーターに関連付けられている通知方法を変更します。

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

構文

'宣言
Public Sub UpdateNotification ( _
    operatorName As String, _
    notifymethod As NotifyMethods _
)
'使用
Dim instance As Alert 
Dim operatorName As String 
Dim notifymethod As NotifyMethods

instance.UpdateNotification(operatorName, _
    notifymethod)
public void UpdateNotification(
    string operatorName,
    NotifyMethods notifymethod
)
public:
void UpdateNotification(
    String^ operatorName, 
    NotifyMethods notifymethod
)
member UpdateNotification : 
        operatorName:string * 
        notifymethod:NotifyMethods -> unit
public function UpdateNotification(
    operatorName : String, 
    notifymethod : NotifyMethods
)

パラメーター

説明

AddNotification メソッドは、オペレーターを警告に関連付けます。 指定されたオペレーターは、警告を生成するイベントが発生すると通知メッセージを受信します。 警告が発生したときに、電子メール、ネットワーク ポップアップ メッセージ、またはポケットベルを使用して通知を送信できます。 AddNotification メソッドを使用すると、オペレーターに警告の通知を割り当てる際に 1 つ以上の通知メカニズムを指定できます。

RemoveNotification メソッドは、警告に対するすべてのオペレーター通知メカニズムを削除します。 UpdateNotification メソッドを使用すると、警告とオペレーターの関連付けを削除せずに通知メカニズムを変更できます。

使用例

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

関連項目

参照

Alert クラス

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

その他の技術情報

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

sp_update_notification (Transact-SQL)