Hi, I added a new message using sp_addmessage(50001,16,'My Message',1)
I then configured an alert to check this message id.
In a stored procedure that does a check for a certain condition, if
condition is true raiserror(50001,16,1).
My hope was that tha alert would fire ans the the response would be to send
me an email.
Since the alert is not firing I get no email.
What am I missing here. Do I have this configured correctly?
Any help is appreciated.
Thanks
GaryTry changing the evert alert definition to reference database name "master",
or "(All Databases)". I had a similar problem and it seem that messages
are send via the master database so the event alert definition needs to be
triggered from master.
----
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"Gary" <Gary@.discussions.microsoft.com> wrote in message
news:FAEAAD58-1CA0-467D-8C5B-1A988D2DB962@.microsoft.com...
> Hi, I added a new message using sp_addmessage(50001,16,'My Message',1)
> I then configured an alert to check this message id.
> In a stored procedure that does a check for a certain condition, if
> condition is true raiserror(50001,16,1).
> My hope was that tha alert would fire ans the the response would be to
send
> me an email.
> Since the alert is not firing I get no email.
> What am I missing here. Do I have this configured correctly?
> Any help is appreciated.
> Thanks
> Gary|||I've got the same problem and have tried setting the reference to All and
master to no avail. Any ideas? My system:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Evaluation Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Jim
"Gregory A. Larsen" wrote:
> Try changing the evert alert definition to reference database name "master
",
> or "(All Databases)". I had a similar problem and it seem that messages
> are send via the master database so the event alert definition needs to be
> triggered from master.
> --
> ----
--
> ----
--
> -
> Need SQL Server Examples check out my website
> http://www.geocities.com/sqlserverexamples
>
> "Gary" <Gary@.discussions.microsoft.com> wrote in message
> news:FAEAAD58-1CA0-467D-8C5B-1A988D2DB962@.microsoft.com...
> send
>
>|||Jim, I got my alert to work. In the properties dialog there is a text box
labeled "Error message contains this text" I cleared it and did not enter
anything. I then clicked apply and then clicked ok. I ran my stored procedur
e
and it fired the alert. I hope this helps you.
Gary
"Jim" wrote:
[vbcol=seagreen]
> I've got the same problem and have tried setting the reference to All and
> master to no avail. Any ideas? My system:
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Evaluation Edition on Windows NT 5.0 (Build 2195: Service Pack
4)
> Jim
> "Gregory A. Larsen" wrote:
>|||1. The messages need to show up in the eventlog. This is what agent polls. N
o messages in Eventlog =
Agent is not aware of them.
2. The "Databases" textbox is misleading. This is only a filter. At least AF
AIK (and I wrote a
similar functionality to Agent's event handling myself). If what you put in
the "Databases" text box
isn't in the message text then the alert will not fire.
3. Same thing for "Error message contains this text".
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gary" <Gary@.discussions.microsoft.com> wrote in message
news:BD2713F2-666C-4842-B479-1F38DAA7FE90@.microsoft.com...[vbcol=seagreen]
> Jim, I got my alert to work. In the properties dialog there is a text box
> labeled "Error message contains this text" I cleared it and did not enter
> anything. I then clicked apply and then clicked ok. I ran my stored proced
ure
> and it fired the alert. I hope this helps you.
> Gary
> "Jim" wrote:
>|||Perfect! Thanks everyone.
Jimsql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment