次の方法で共有


Operators Collection

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The Operators collection contains Operator objects referencing SQL Server Agent operators.

現在のオブジェクトを表す SQL-DMO オブジェクト モデル

Properties

Count Property

 

Methods

Add Method

Refresh Method

Item Method

Remove Method (Operators)

ItemByID Method

Script Method

解説

With the Operators collection, you can:

  • Create a SQL Server Agent operator.
  • Remove a SQL Server Agent operator.
  • Generate a Transact-SQL script that can be used as part of a SQL Server administrative task, such as installation backup.

For more information about creating a SQL Server Agent operator by using the Operator object and Operators collection, see Operator Object.

To remove a SQL Server Agent operator

  1. Use the Remove method of the Operators collection, as in:

    oJobServer.Operators.Remove("stevenb")
    

When using the Item or Remove method, the Operators collection supports member identification using either name or ordinal reference syntax. For example:

Set oOperator = oJobServer.Operators("someone")

Or:

Set oOperator = oJobServer.Operators(1)
ms138232.note(ja-jp,SQL.90).gifメモ :
Creating or removing a SQL Server Agent operator by using the Operators collection requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the fixed role sysadmin.