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

This topic explains how to create Transact-SQL scripts that create SQL Server Agent proxies.

To script a proxy using Transact-SQL

  1. In Object Explorer, expand a server group, and then expand a server.

  2. Expand SQL Server Agent, expand Proxies, expand the subsystem for the proxy you want to script, and right-click the proxy.

  3. From the right-click menu, select Script Proxy as, then 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.