Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This topic describes how to generate a Transact-SQL script that creates a Microsoft SQL Server Agent alert.
To script alerts using Transact-SQL
In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
Expand SQL Server Agent.
Expand Alerts. Right-click an alert, and point to Script Alert 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 Alert Using Severity Level (SQL Server Management Studio)
How to: Create an Alert Using an Error Number (SQL Server Management Studio)