Freigeben über


UpdateNotification Method

Dieses Feature wird in einer zukünftigen Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The UpdateNotification method configures SQL Server Agent operator notification for alerts raised.

Syntax

object
.UpdateNotification(
AlertOrOperator
,
NotificationType
)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • AlertOrOperator
    String that specifies a SQL Server Agent alert or operator by name as described in Settings.
  • NotificationType
    Long integer that specifies a notification method as described in Settings.

Prototype (C/C++)

HRESULT UpdateNotification(
SQLDMO_LPCSTR AlertOrOperatorName,
SQLDMO_NOTIFY_TYPE NotifyMethod);

Settings

When setting the AlertOrOperator argument of the UpdateNotification method of the Alert object, the string identifies an existing operator by name. When setting the argument for the Operator object method, the string identifies an existing alert by name.

Set NotificationType by using these values.

Constant Value Description

SQLDMONotify_All

7

Notification by e-mail, e-mail sent to the pager address, and network pop-up message.

SQLDMONotify_Email

1

Notification by e-mail sent to the operator e-mail address.

SQLDMONotify_NetSend

4

Notification by network pop-up message posted to the operator network address

SQLDMONotify_None

0

No notification method specified for the referenced operator.

SQLDMONotify_Pager

2

Notification by e-mail sent to the operator pager address.

Hinweise

The AddNotification method associates operators with alerts. Operators designated receive notification messages when an event raising an alert occurs. When an alert is raised, notification can be sent using e-mail, network pop-up message, or pager. The AddNotification method allows specification of one or more notification mechanisms when operators are assigned notification for an alert.

The RemoveNotification method removes all operator notification mechanisms for an alert. Use the UpdateNotification method to alter the notification mechanism without dropping the association between an alert and operator.

Applies To:

Alert Object

Operator Object

Siehe auch

Verweis

AddNotification Method
RemoveNotification Method

Hilfe und Informationen

Informationsquellen für SQL Server 2005