Event Notifications Sample



The event notification sample (EventNotificationSample.sql) provides an example of how event notifications can be used in an OLTP database application. For more information, see Event Notifications (Database Engine).

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 should not be connected to or used with your production SQL Server database without the permission of the system administrator.



Scenario

Event notifications can be used to monitor and respond to database activity. EventNotificationSample.sql monitors the following kinds of events:

Languages

Transact-SQL

Prerequisites

Before running this sample, make sure the following software is installed:

Running the Sample

The following procedure shows how to install and run the event notification sample.
To run the event notification sample
  1. From SQL Server Management Studio, open EventNotificationSample.sql. The default installation directory is C:\Program Files\Microsoft SQL Server\90\Samples\Engine\Administration\EventNotifications\Scripts\.
  2. Click Execute. © 2007 Microsoft Corporation. All rights reserved.