共用方式為


Operator Object

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The Operator object represents a single Microsoft SQL Server operator. SQL Server operators receive alert and job status notification in response to events generated by the server.

顯示目前物件的 SQL-DMO 物件模型

Properties

Category Property

Name Property

EmailAddress Property

NetSendAddress Property

Enabled Property

PagerAddress Property

ID Property

PagerDays Property

LastEmailDate Property

SaturdayPagerEndTime Property

LastEmailTime Property

SaturdayPagerStartTime Property

LastNetSendDate Property

SundayPagerEndTime Property

LastNetSendTime Property

SundayPagerStartTime Property

LastPageDate Property

WeekdayPagerEndTime Property

LastPageTime Property

WeekdayPagerStartTime Property

Methods

AddNotification Method

Refresh Method

BeginAlter Method

Remove Method (Operator)

CancelAlter Method

RemoveNotification Method

DoAlter Method

Script Method

EnumJobNotifications Method

UpdateNotification Method

EnumNotifications Method

 

備註

Use the Operator object to manage the SQL Server operators defined for an instance of SQL Server. With the Operator object, you can:

  • Define new operators on an instance of SQL Server.
  • Assign alert notifications to the operator.
  • Change the scheduled response times for an existing operator.

The Name property of an Operator object is required when creating an operator on SQL Server. The Name property uses the SQL Server data type varchar(100).

A SQL Server operator created with the minimum required values has no schedule information and is assigned no notifications.

To create a SQL Server operator

  1. Create an Operator object.

  2. Set the Name property.

  3. Add the Operator object to the Operators collection of a connected JobServer object.

To modify an existing SQL Server operator

  1. Get an Operator object from the Operators collection of a connected JobServer object.

  2. Use the BeginAlter method to mark the start of changes to existing property values.

  3. Change property values to reflect changes in behavior.

  4. Use the DoAlter method to mark the end of changes and make changes in the SQL Server operator.

請參閱

其他資源

定義操作員

說明及資訊

取得 SQL Server 2005 協助