Alert.AddNotification 方法

Designates an operator that receives a notification message when the alert is raised.

命名空间:  Microsoft.SqlServer.Management.Smo.Agent
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public Sub AddNotification ( _
    operatorName As String, _
    notifymethod As NotifyMethods _
)
用法
Dim instance As Alert 
Dim operatorName As String 
Dim notifymethod As NotifyMethods

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

参数

示例

在 SQL Server 代理中计划自动管理任务

请参阅

参考

Alert 类

Microsoft.SqlServer.Management.Smo.Agent 命名空间

其他资源

自动执行管理任务(SQL Server 代理)

sp_add_notification (Transact-SQL)