Readme_Alerts Sample
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
The purpose of the Alerts sample is to demonstrate the alert capabilities of SQL Server. For more information, see "Defining Alerts" in SQL Server Books Online.
Important
Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications and assemblies should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.
Scenario
This sample script file creates SQL Server Agent alerts in SQL Server.
After the execution of this script you will find new alerts added to the alerts collection. You can examine them in SQL Server Management Studio or by calling sp_help_alert stored procedure.
Languages
Transact-SQL
Prerequisites
Before you run this sample, perform the following tasks:
- Install SQL Server and make sure you include the following components:
- The Database Engine
- SQL Server Management Studio
- Download the AdventureWorks2008R2 (OLTP) sample database and Database Engine samples available at the Microsoft SQL Server Samples and Community Projects Web site.
Running the Sample
The following procedure shows how to run the Alerts sample.
Running the Alerts Sample
From Management Studio, open the agent_sample_alerts.sql script. The default installation directory is C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Administration\Alerts\Scripts.
Click Execute.