SQL-DMO

Operators Collection

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

Properties
Count Property  

Methods
Add Method Refresh Method
Item Method Remove Method (Operators)
ItemByID Method Script Method

Remarks

With the Operators collection, you can:

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



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("anned")

Or:

Set oOperator = oJobServer.Operators(1)

Note  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.