December 7, 2011 at 12:21 pm
Hi all.
I am new to SQL Server alerts, and I am trying to setup an alert based on the severity level, that should run a job and send notifications.
In order to test if the alert works correctly I have downloaded a sample corrupted database from http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/04/17/example-corrupt-database-to-play-with.aspx, and I have restored the database and issued a query against the database which failed with error 824 and level 24.
But although the error is a severe error and was logged to both the SQL log and the Windows Application Log nothing seemed to work, I have even tested with both an alert an on the specific database and on all databases.
(I have even setup alerts on all other levels from 19 and above just to confirm that nothing is happening.)
However an alert based on error number 824 did work, as well as an alert based on the performance counter's Sql Error counter did worked correctly.
Any suggestions?
December 8, 2011 at 2:12 am
You could also use the RAISERROR keyword to raise errors on different error ids and severities.
Can you send screenshot of your alert configuration and the lines from the SQL error log for the alerts, it could just be something trivial.
Also as you want to email, I take it you have operators setup, database mail configured, SQL Agent Alert system set with the DB Mail profile and have restarted the SQL Agent for it to take into account the new Alert system settings?
December 8, 2011 at 8:42 am
The problem was resolved on http://dba.stackexchange.com/questions/8928/sql-server-alert-based-on-severity-level-not-working in that a restart of the agent worked, although I don't know why.
December 8, 2011 at 8:45 am
that would be due to picking up the mail settings.
you can set the mail settings in the SQL Agent alert system and click ok and think right thats working, but it doesnt pick up the change until after a reboot.
its like you have changed the config file, but as its already running it doesnt update the config till its restarted and reloaded.
December 8, 2011 at 9:58 am
The fact that it works on some alerts and not on the other looks like this is not what it intends to be, rather it is some kind of bug.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply