다음을 통해 공유


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)

[!참고] 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.