Showing posts with label firing. Show all posts
Showing posts with label firing. Show all posts

Sunday, March 25, 2012

Alerts not firing off jobs.

sql2k
sp3
Howdy all. I set up an Alert for deadlocks (# 1205) and have the checkbox
checked to fire off a job when it occurs. I then generate a deadlock, but the
job never gets fired off. Some important fun facts:
1; I ran dbcc traceon with 1205 and 1205 to log deadlocks.
2; I've tried running different jobs manually. They both work.Is the alert itself firing? Make sure that the EventLog
service and SQL Agent are running. Check the Event log to
make sure that it is not full. Check if the event is writing
to the Application log. There is also a topic in books
online with more information on troubleshooting alerts.
Check the topic: Troubleshooting Alerts
-Sue
On Thu, 13 Apr 2006 15:36:02 -0700, ChrisR
<ChrisR@.discussions.microsoft.com> wrote:
>sql2k
>sp3
>Howdy all. I set up an Alert for deadlocks (# 1205) and have the checkbox
>checked to fire off a job when it occurs. I then generate a deadlock, but the
>job never gets fired off. Some important fun facts:
>1; I ran dbcc traceon with 1205 and 1205 to log deadlocks.
>2; I've tried running different jobs manually. They both work.
>

Alerts not firing off jobs.

sql2k
sp3
Howdy all. I set up an Alert for deadlocks (# 1205) and have the checkbox
checked to fire off a job when it occurs. I then generate a deadlock, but th
e
job never gets fired off. Some important fun facts:
1; I ran dbcc traceon with 1205 and 1205 to log deadlocks.
2; I've tried running different jobs manually. They both work.Is the alert itself firing? Make sure that the EventLog
service and SQL Agent are running. Check the Event log to
make sure that it is not full. Check if the event is writing
to the Application log. There is also a topic in books
online with more information on troubleshooting alerts.
Check the topic: Troubleshooting Alerts
-Sue
On Thu, 13 Apr 2006 15:36:02 -0700, ChrisR
<ChrisR@.discussions.microsoft.com> wrote:

>sql2k
>sp3
>Howdy all. I set up an Alert for deadlocks (# 1205) and have the checkbox
>checked to fire off a job when it occurs. I then generate a deadlock, but t
he
>job never gets fired off. Some important fun facts:
>1; I ran dbcc traceon with 1205 and 1205 to log deadlocks.
>2; I've tried running different jobs manually. They both work.
>

Alerts not firing

I have an MSDE 2000 installation on Windows 2000 Pro.
Can anyone give me any ideas why when I execute this command
RAISERROR('Test Error', 16, 1)
The corresponding severity level 16 Alert isn't fired?

Thanks
Phill
hi Phill,
Phill wrote:
> I have an MSDE 2000 installation on Windows 2000 Pro.
> Can anyone give me any ideas why when I execute this command
> RAISERROR('Test Error', 16, 1)
> The corresponding severity level 16 Alert isn't fired?
please modify your code as
RAISERROR('Test Error', 16, 1) WITH LOG
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Ok, that still doesn't fire the alert though.
"Andrea Montanari" wrote:

> hi Phill,
> Phill wrote:
> please modify your code as
> RAISERROR('Test Error', 16, 1) WITH LOG
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||hi Phill,
Phill wrote:
> Ok, that still doesn't fire the alert though.
>
is th SQL Server Agent running?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Yes the Agent is running.
It has 3 scheduled jobs that run every night. One of the jobs performs a
DBCC DBREINDEX as one one of 6 steps. This step fails because the database
size has reached 2gb. The other 2 jobs run without problems.
However as far as the server is concered the alerts didn't happen.
"Andrea Montanari" wrote:

> hi Phill,
> Phill wrote:
> is th SQL Server Agent running?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||Hello,
For a stored procedure in vb6, I know that the first line of the stored
procedure must be
SET NOCOUNT ON
if there is more than one select. If you don't do it, vb 6 can't receive
the error in a stored procedure.
Perhaps you can try with that.
Marc Allard
Allcomp
Phill wrote:[vbcol=seagreen]
> Yes the Agent is running.
> It has 3 scheduled jobs that run every night. One of the jobs performs a
> DBCC DBREINDEX as one one of 6 steps. This step fails because the database
> size has reached 2gb. The other 2 jobs run without problems.
> However as far as the server is concered the alerts didn't happen.
>
> "Andrea Montanari" wrote:
>

Thursday, March 22, 2012

Alert Not Firing

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
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...
> 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 procedure
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. No messages in Eventlog =
Agent is not aware of them.
2. The "Databases" textbox is misleading. This is only a filter. At least AFAIK (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 procedure
> and it fired the alert. I hope this helps you.
> Gary
> "Jim" wrote:
|||Perfect! Thanks everyone.
Jim

alert not firing

Hi,
I set up an alert to notify me of failed login attempts and it worked fine
up until SQL Server was bounced yesterday. The messages are still going into
the error log but the alert count doesn't go up and so the notification
doesn't happen any more. The SQLServer agent is running, jobs are running on
schedule, but not these alerts. I'm using netsend and can successfully send a
test message.
I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
Windows NT 4.0 (Build 1381: Service Pack 6)
Thanks for any help
Is the alert appearing in the Windows event log and is the
event log service running? If it's not in the event log,
check the properties for the event log, make sure the
service is running and that the log is not full if not set
to overwrite.
-Sue
On Thu, 7 Apr 2005 03:57:02 -0700, "John"
<John@.discussions.microsoft.com> wrote:

>Hi,
>I set up an alert to notify me of failed login attempts and it worked fine
>up until SQL Server was bounced yesterday. The messages are still going into
>the error log but the alert count doesn't go up and so the notification
>doesn't happen any more. The SQLServer agent is running, jobs are running on
>schedule, but not these alerts. I'm using netsend and can successfully send a
>test message.
>I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
>Windows NT 4.0 (Build 1381: Service Pack 6)
>Thanks for any help
|||thanks for the quick response Sue,
the alerts are still appearing in the Windows event log
"Sue Hoegemeier" wrote:

> Is the alert appearing in the Windows event log and is the
> event log service running? If it's not in the event log,
> check the properties for the event log, make sure the
> service is running and that the log is not full if not set
> to overwrite.
> -Sue
> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
>
>
|||Check the Agent Error log for all messages. If you are set
up as an operator, check to see if you have any hours
restrictions.
There is also a troubleshooting article in books online:
Troubleshooting Alerts
-Sue
On Thu, 7 Apr 2005 06:31:06 -0700, "John"
<John@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>thanks for the quick response Sue,
>the alerts are still appearing in the Windows event log
>"Sue Hoegemeier" wrote:
|||doh! It's part of a failover cluster - I must have set up the alert on the
primary cluster but not on the secondary, so when the server was bounced it
would have failed over, hence the alert not firing! That's my theory anyway,
I can't test it just yet because I need to recycle once again to ensure that
the audit level is correctly set to 'failures' - how do you check that this
is set? I can see that I have set it in EM but that won't take effect until I
recycle - does sp_configure display the current setting?
"Sue Hoegemeier" wrote:

> Check the Agent Error log for all messages. If you are set
> up as an operator, check to see if you have any hours
> restrictions.
> There is also a troubleshooting article in books online:
> Troubleshooting Alerts
> -Sue
> On Thu, 7 Apr 2005 06:31:06 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
>
>
|||No...the auditing setting is not available with sp_configure
The audit level is recorded in the AuditLevel key in the
registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer
3 = All, 2 = Failure, 1 = Success, 0 = None.
-Sue
On Fri, 8 Apr 2005 02:51:05 -0700, "John"
<John@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>doh! It's part of a failover cluster - I must have set up the alert on the
>primary cluster but not on the secondary, so when the server was bounced it
>would have failed over, hence the alert not firing! That's my theory anyway,
>I can't test it just yet because I need to recycle once again to ensure that
>the audit level is correctly set to 'failures' - how do you check that this
>is set? I can see that I have set it in EM but that won't take effect until I
>recycle - does sp_configure display the current setting?
>"Sue Hoegemeier" wrote:

alert not firing

Hi,
I set up an alert to notify me of failed login attempts and it worked fine
up until SQL Server was bounced yesterday. The messages are still going into
the error log but the alert count doesn't go up and so the notification
doesn't happen any more. The SQLServer agent is running, jobs are running on
schedule, but not these alerts. I'm using netsend and can successfully send
a
test message.
I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
Windows NT 4.0 (Build 1381: Service Pack 6)
Thanks for any helpIs the alert appearing in the Windows event log and is the
event log service running? If it's not in the event log,
check the properties for the event log, make sure the
service is running and that the log is not full if not set
to overwrite.
-Sue
On Thu, 7 Apr 2005 03:57:02 -0700, "John"
<John@.discussions.microsoft.com> wrote:

>Hi,
>I set up an alert to notify me of failed login attempts and it worked fine
>up until SQL Server was bounced yesterday. The messages are still going int
o
>the error log but the alert count doesn't go up and so the notification
>doesn't happen any more. The SQLServer agent is running, jobs are running o
n
>schedule, but not these alerts. I'm using netsend and can successfully send
a
>test message.
>I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
>Windows NT 4.0 (Build 1381: Service Pack 6)
>Thanks for any help|||thanks for the quick response Sue,
the alerts are still appearing in the Windows event log
"Sue Hoegemeier" wrote:

> Is the alert appearing in the Windows event log and is the
> event log service running? If it's not in the event log,
> check the properties for the event log, make sure the
> service is running and that the log is not full if not set
> to overwrite.
> -Sue
> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
>
>|||Check the Agent Error log for all messages. If you are set
up as an operator, check to see if you have any hours
restrictions.
There is also a troubleshooting article in books online:
Troubleshooting Alerts
-Sue
On Thu, 7 Apr 2005 06:31:06 -0700, "John"
<John@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>thanks for the quick response Sue,
>the alerts are still appearing in the Windows event log
>"Sue Hoegemeier" wrote:
>|||doh! It's part of a failover cluster - I must have set up the alert on the
primary cluster but not on the secondary, so when the server was bounced it
would have failed over, hence the alert not firing! That's my theory anyway,
I can't test it just yet because I need to recycle once again to ensure that
the audit level is correctly set to 'failures' - how do you check that this
is set? I can see that I have set it in EM but that won't take effect until
I
recycle - does sp_configure display the current setting?
"Sue Hoegemeier" wrote:

> Check the Agent Error log for all messages. If you are set
> up as an operator, check to see if you have any hours
> restrictions.
> There is also a troubleshooting article in books online:
> Troubleshooting Alerts
> -Sue
> On Thu, 7 Apr 2005 06:31:06 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
>
>|||No...the auditing setting is not available with sp_configure
The audit level is recorded in the AuditLevel key in the
registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\MSSQLServer
3 = All, 2 = Failure, 1 = Success, 0 = None.
-Sue
On Fri, 8 Apr 2005 02:51:05 -0700, "John"
<John@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>doh! It's part of a failover cluster - I must have set up the alert on the
>primary cluster but not on the secondary, so when the server was bounced it
>would have failed over, hence the alert not firing! That's my theory anyway
,
>I can't test it just yet because I need to recycle once again to ensure tha
t
>the audit level is correctly set to 'failures' - how do you check that this
>is set? I can see that I have set it in EM but that won't take effect until
I
>recycle - does sp_configure display the current setting?
>"Sue Hoegemeier" wrote:
>

Alert Not Firing

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

alert not firing

Hi,
I set up an alert to notify me of failed login attempts and it worked fine
up until SQL Server was bounced yesterday. The messages are still going into
the error log but the alert count doesn't go up and so the notification
doesn't happen any more. The SQLServer agent is running, jobs are running on
schedule, but not these alerts. I'm using netsend and can successfully send a
test message.
I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
Windows NT 4.0 (Build 1381: Service Pack 6)
Thanks for any helpIs the alert appearing in the Windows event log and is the
event log service running? If it's not in the event log,
check the properties for the event log, make sure the
service is running and that the log is not full if not set
to overwrite.
-Sue
On Thu, 7 Apr 2005 03:57:02 -0700, "John"
<John@.discussions.microsoft.com> wrote:
>Hi,
>I set up an alert to notify me of failed login attempts and it worked fine
>up until SQL Server was bounced yesterday. The messages are still going into
>the error log but the alert count doesn't go up and so the notification
>doesn't happen any more. The SQLServer agent is running, jobs are running on
>schedule, but not these alerts. I'm using netsend and can successfully send a
>test message.
>I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
>Windows NT 4.0 (Build 1381: Service Pack 6)
>Thanks for any help|||thanks for the quick response Sue,
the alerts are still appearing in the Windows event log
"Sue Hoegemeier" wrote:
> Is the alert appearing in the Windows event log and is the
> event log service running? If it's not in the event log,
> check the properties for the event log, make sure the
> service is running and that the log is not full if not set
> to overwrite.
> -Sue
> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
> >Hi,
> >I set up an alert to notify me of failed login attempts and it worked fine
> >up until SQL Server was bounced yesterday. The messages are still going into
> >the error log but the alert count doesn't go up and so the notification
> >doesn't happen any more. The SQLServer agent is running, jobs are running on
> >schedule, but not these alerts. I'm using netsend and can successfully send a
> >test message.
> >I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
> >Windows NT 4.0 (Build 1381: Service Pack 6)
> >Thanks for any help
>|||Check the Agent Error log for all messages. If you are set
up as an operator, check to see if you have any hours
restrictions.
There is also a troubleshooting article in books online:
Troubleshooting Alerts
-Sue
On Thu, 7 Apr 2005 06:31:06 -0700, "John"
<John@.discussions.microsoft.com> wrote:
>thanks for the quick response Sue,
>the alerts are still appearing in the Windows event log
>"Sue Hoegemeier" wrote:
>> Is the alert appearing in the Windows event log and is the
>> event log service running? If it's not in the event log,
>> check the properties for the event log, make sure the
>> service is running and that the log is not full if not set
>> to overwrite.
>> -Sue
>> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
>> <John@.discussions.microsoft.com> wrote:
>> >Hi,
>> >I set up an alert to notify me of failed login attempts and it worked fine
>> >up until SQL Server was bounced yesterday. The messages are still going into
>> >the error log but the alert count doesn't go up and so the notification
>> >doesn't happen any more. The SQLServer agent is running, jobs are running on
>> >schedule, but not these alerts. I'm using netsend and can successfully send a
>> >test message.
>> >I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
>> >Windows NT 4.0 (Build 1381: Service Pack 6)
>> >Thanks for any help
>>|||doh! It's part of a failover cluster - I must have set up the alert on the
primary cluster but not on the secondary, so when the server was bounced it
would have failed over, hence the alert not firing! That's my theory anyway,
I can't test it just yet because I need to recycle once again to ensure that
the audit level is correctly set to 'failures' - how do you check that this
is set? I can see that I have set it in EM but that won't take effect until I
recycle - does sp_configure display the current setting?
"Sue Hoegemeier" wrote:
> Check the Agent Error log for all messages. If you are set
> up as an operator, check to see if you have any hours
> restrictions.
> There is also a troubleshooting article in books online:
> Troubleshooting Alerts
> -Sue
> On Thu, 7 Apr 2005 06:31:06 -0700, "John"
> <John@.discussions.microsoft.com> wrote:
> >thanks for the quick response Sue,
> >the alerts are still appearing in the Windows event log
> >
> >"Sue Hoegemeier" wrote:
> >
> >> Is the alert appearing in the Windows event log and is the
> >> event log service running? If it's not in the event log,
> >> check the properties for the event log, make sure the
> >> service is running and that the log is not full if not set
> >> to overwrite.
> >>
> >> -Sue
> >>
> >> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
> >> <John@.discussions.microsoft.com> wrote:
> >>
> >> >Hi,
> >> >I set up an alert to notify me of failed login attempts and it worked fine
> >> >up until SQL Server was bounced yesterday. The messages are still going into
> >> >the error log but the alert count doesn't go up and so the notification
> >> >doesn't happen any more. The SQLServer agent is running, jobs are running on
> >> >schedule, but not these alerts. I'm using netsend and can successfully send a
> >> >test message.
> >> >I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
> >> >Windows NT 4.0 (Build 1381: Service Pack 6)
> >> >Thanks for any help
> >>
> >>
>|||No...the auditing setting is not available with sp_configure
The audit level is recorded in the AuditLevel key in the
registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
3 = All, 2 = Failure, 1 = Success, 0 = None.
-Sue
On Fri, 8 Apr 2005 02:51:05 -0700, "John"
<John@.discussions.microsoft.com> wrote:
>doh! It's part of a failover cluster - I must have set up the alert on the
>primary cluster but not on the secondary, so when the server was bounced it
>would have failed over, hence the alert not firing! That's my theory anyway,
>I can't test it just yet because I need to recycle once again to ensure that
>the audit level is correctly set to 'failures' - how do you check that this
>is set? I can see that I have set it in EM but that won't take effect until I
>recycle - does sp_configure display the current setting?
>"Sue Hoegemeier" wrote:
>> Check the Agent Error log for all messages. If you are set
>> up as an operator, check to see if you have any hours
>> restrictions.
>> There is also a troubleshooting article in books online:
>> Troubleshooting Alerts
>> -Sue
>> On Thu, 7 Apr 2005 06:31:06 -0700, "John"
>> <John@.discussions.microsoft.com> wrote:
>> >thanks for the quick response Sue,
>> >the alerts are still appearing in the Windows event log
>> >
>> >"Sue Hoegemeier" wrote:
>> >
>> >> Is the alert appearing in the Windows event log and is the
>> >> event log service running? If it's not in the event log,
>> >> check the properties for the event log, make sure the
>> >> service is running and that the log is not full if not set
>> >> to overwrite.
>> >>
>> >> -Sue
>> >>
>> >> On Thu, 7 Apr 2005 03:57:02 -0700, "John"
>> >> <John@.discussions.microsoft.com> wrote:
>> >>
>> >> >Hi,
>> >> >I set up an alert to notify me of failed login attempts and it worked fine
>> >> >up until SQL Server was bounced yesterday. The messages are still going into
>> >> >the error log but the alert count doesn't go up and so the notification
>> >> >doesn't happen any more. The SQLServer agent is running, jobs are running on
>> >> >schedule, but not these alerts. I'm using netsend and can successfully send a
>> >> >test message.
>> >> >I'm running Microsoft SQL Server 2000 - 8.00.194 Enterprise Edition on
>> >> >Windows NT 4.0 (Build 1381: Service Pack 6)
>> >> >Thanks for any help
>> >>
>> >>
>>

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.AAlert firing is based on the eventlog. Make sure you write to eventlog. Use either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and specify there to always write
to eventlog.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegroups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>|||Thanks a lot Tibor.
I got a solution. Alert is firing now.

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.A
Alert firing is based on the eventlog. Make sure you write to eventlog. Use either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and specify there to always write
to eventlog.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegr oups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>
|||Thanks a lot Tibor.
I got a solution. Alert is firing now.
sql

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.AAlert firing is based on the eventlog. Make sure you write to eventlog. Use
either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and speci
fy there to always write
to eventlog.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegroups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>|||Thanks a lot Tibor.
I got a solution. Alert is firing now.

Monday, February 13, 2012

AFTER INSERT trigger not firing in SQL 2005

Nothing fancy; just a trigger on a sharepoint table that supposed to
write a record to another SQL table.

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER TRIGGER [TV_UpdateFileSyncProgress]
ON [dbo].[Docs]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;

BEGIN
IF EXISTS (SELECT null FROM inserted WHERE DirName like
'csm/%/Shared Documents')

BEGIN
IF NOT EXISTS (SELECT null FROM inserted INNER JOIN
TV_FileSyncProgress fp ON LOWER(RTRIM(fp.LeafName)) =
LOWER(RTRIM(Replace(Replace(inserted.DirName,'csm/',''),'/Shared
Documents','') + '\' + inserted.LeafName)))

BEGIN
INSERT INTO TV_FileSyncProgress (InternalOrigin, ExternalOrigin,
ChangeType, SiteId, DirName, LeafName, FlagForDelete)
SELECT
0,1,1,SiteId,'F:\common\Extranet\',Replace(Replace (DirName,'csm/',''),'/Shared
Documents','') + '\' + LeafName,0 FROM inserted

END

END

END

ENDibrettferguson@.gmail.com wrote:

Quote:

Originally Posted by

Nothing fancy; just a trigger on a sharepoint table that supposed to
write a record to another SQL table.
>
>
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
>
ALTER TRIGGER [TV_UpdateFileSyncProgress]
ON [dbo].[Docs]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
>
BEGIN
IF EXISTS (SELECT null FROM inserted WHERE DirName like
'csm/%/Shared Documents')
>
BEGIN
IF NOT EXISTS (SELECT null FROM inserted INNER JOIN
TV_FileSyncProgress fp ON LOWER(RTRIM(fp.LeafName)) =
LOWER(RTRIM(Replace(Replace(inserted.DirName,'csm/',''),'/Shared
Documents','') + '\' + inserted.LeafName)))
>
BEGIN
INSERT INTO TV_FileSyncProgress (InternalOrigin, ExternalOrigin,
ChangeType, SiteId, DirName, LeafName, FlagForDelete)
SELECT
0,1,1,SiteId,'F:\common\Extranet\',Replace(Replace (DirName,'csm/',''),'/Shared
Documents','') + '\' + LeafName,0 FROM inserted
>
END
>
END
>
END
>
END


Figured it out.

A bug in my win service was deleting the records as they were being
inserted in the destination table.

Neat.

(Today, I would like to own a lawn care business... yes, a lawn care
business. )