December 2013
Intermediate to advanced
1872 pages
153h 31m
English
To test your new alert notification, you open a new query window in SMSS and enter the following code:
USE AdventureWorks2012goRAISERROR('This is an alert mail test', 10, 1) WITH LOGgo'This is an alert mail test'
Because you specified WITH LOG, this simple statement writes an event to the Windows Event log, which in turn triggers the alert because the database context, message text, and severity all match the conditions of the alert. An email message should have appeared in your inbox, indicating the alert’s successful triggering. This message should contain body text such as this:
DATE/TIME: 5/7/2009 9:00:45 PMDESCRIPTION: Error: 50000 Severity: 10 ...