• 相关软件
    >sp_update_notification 创建者:webmaster 更新时间:2006-02-16 15:51

    更新警报提示的提示方法。



    语法


    sp_update_notification [@alert_name =] 'alert',

        
    [@operator_name =] 'operator',

        
    [@notification_method =] notification



    参数


    [@alert_name =] 'alert'



    是与此提示相关联的警报名称。alert 的数据类型为 sysname,无默认值。



    [@operator_name =] 'operator'



    是警报发生时所要通知的操作员。operator 的数据类型为 sysname,无默认值。



    [@notification_method =] notification



    是通知操作员的方法。notification 的数据类型为 tinyint,无默认值,且可以取下列值中的一个或多个值。





























    描述
    1电子邮件
    2呼叫程序
    4net send
    7所有方法



    返回代码值


    0(成功)或 1(失败)



    注释


    sp_update_notification 必须从 msdb 数据库中运行。



    可以为不具有指定的 notification_method 所必需的地址信息的操作员更新提示。如果发送电子邮件或呼叫程序提示时出现故障,则该故障将被记录到 SQL Server 代理程序错误日志。



    权限


    只有 sysadmin 固定服务器角色的成员才能执行 sp_update_notification



    示例


    下例为发送给 stevenb 的提示修改提示方法,该提示是为警报 Test Alert 发送的。



    USE msdb
    EXEC sp_update_notification 'Test Alert', 'stevenb', 7
    相关文章
    本页查看次数: