Partilhar via


How to: Script Operators Using Transact-SQL (SQL Server Management Studio)

This topic describes how to generate a Transact-SQL script that creates a Microsoft SQL Server Agent operator.

To script operators using Transact-SQL

  1. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.

  2. Expand SQL Server Agent.

  3. Expand Operators. Right-click an operator and select Script Operator as. Select CREATE To or DROP To and click one of the following:

    • New Query Editor Window, which opens a new Query Editor window and writes the Transact-SQL script to it.
    • File, which saves the Transact-SQL script to a file.
    • Clipboard, which saves the Transact-SQL script to the Clipboard.

See Also

Tasks

How to: Create an Operator (SQL Server Management Studio)

Help and Information

Getting SQL Server 2005 Assistance