Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 How to get an Alert working

Author  Topic 

ozSQLServer
Starting Member

32 Posts

Posted - 2011-09-21 : 02:35:33
Hi,

In an attempt of testing the Alerts in SQL Server 2008, I've done the following:

1. created an operator an my email
2. create an alert that should send email if error of severity=11 is issued (which includes accessing not found object).
EXEC msdb.dbo.sp_add_alert @name=N'Monitor when accessed object not found',
@message_id=0,
@severity=11,
@enabled=1,
@delay_between_responses=0,
@include_event_description_in=1,
@notification_message=N'monitor when object isn''t found',
@category_name=N'[Uncategorized]',
@job_id=N'00000000-0000-0000-0000-000000000000'


3. to test the alert, I issued the following command:
drop table x;

which returns the following error:
Msg 3701, Level 11, State 5, Line 3
Cannot drop the table 'x', because it does not exist or you do not have permission.

Yet, no email sent.

The Agent service is running.

Any clarification is appreciated.

Cheers,
ozSQL
   

- Advertisement -