February 13, 2013 at 12:26 pm
SQL 2005 Enterprise X64 SP4
ALERTS: SQL SERVER EVENT ALERT ---->Severity
Has anyone noticed that the Alerts only seem to trigger when the "Event" is logged to the Errorlog?
Anything that does not end up in the log does not seem to produce an alert response or update the alert history.
I can recreate this easily:
RAISERROR('Error test, 16, 1) WITH LOG; -- This triggers alert successfully
RAISERROR('Error test, 16, 1); -- This will not
My problem is I would like non-user defined errors to trigger alerts.
For example: Msg 8134, Level 16, State 1, Line 1
Is this a known bug? Are there configuration settings to change what errors are recorded in the log?
Can I send all Severity 16 to the log? (without raiserror)
Thanks for your help.
Mark G.
February 13, 2013 at 3:48 pm
These are the English messages that get logged automatically.
SELECT *
FROM sys.messages
WHERE language_id = 1033
AND (
is_event_logged = 1
OR severity >= 19
)
ORDER BY message_id;
If you want to start logging error 8134, or any message that is not logged by default, you can use this:
DECLARE @message_id INT = 8134;
EXEC sys.sp_altermessage
@message_id = @message_id,
@parameter = 'WITH_LOG',
@parameter_value = 'TRUE';
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 14, 2013 at 6:56 am
OPC, exactly what I was looking for.
Thank you very much!
Mark G.
February 14, 2013 at 7:36 am
You're welcome. Thanks for the feedback.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply