October 27, 2008 at 12:28 pm
Hi,
I'm trying to monitor after this event id 17890 in the sql server.
i've created an alert with sql server event alert error number 17890
set the respond to this event and then raiserror for the test,and nothing happen.
i raise the error with this syntax
RAISERROR (17890, 10, 1)
Why i don't get any respond to this event?
THX
October 27, 2008 at 4:19 pm
Hi
Try chaning the severity to 11. I know that 10 gets convert to 0 internally (see BOL) and the system does not raise any errors for severity 0 to 9. I had to convert all of our severity 10's to 11 so our application could detect an error had happen. I did have a URL for why this is so, but can't find it. Maybe some one else provide it 🙂
Regards
Richard...
http://www.linkedin.com/in/gbd77rc
October 28, 2008 at 3:05 am
If this is the first alert on this sqlserver, you may have to stop/start sqlagent.
try this:
RAISERROR (17890, 10, 1) with log
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 28, 2008 at 11:23 am
Hi All,
Sorry for giving out bad advise there. I did some more research in BOL and found out why I did not use WITH LOG option on RAISERROR. It is restricted to the sysadmin user or a user with ALTER TRACE permission, in my case the standard user would not have these permissions.
Generally the severity is defaulted to the value that was setup in sp_add_message.
Now with your problem. I set up the alert, operator and db mail, but was not able to recieve emails about the alert. I was using RAISERROR(17890,10,1) to raise the alert. I did see the application event log did have entries related to error message and that email test worked.
After some investigate I found this info on http://www.mssqltips.com/tip.asp?tip=1523 I just did the steps relating to SQL server Agent and enabling mail profile on alert system and then restarted the agent. Then it started to work fine.
I forgot about the SQL Server Agent settings!
Regards
Richard..
http://www.linkedin.com/in/gbd77rc
October 28, 2008 at 1:47 pm
Thx, it's working now.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply