Friday, February 24, 2012

Connection count alert

I`m trying to setup an alert in Windows to shoot an email when the
connections on SQL server exceed a preset amount. The alert will fire
a bat file that executes an OSQL script that sends the email alert.
When I test the .bat file alone it`s fine but when combined with the
alert monitor nothing happens. Any ideas or is there a better way to
achieve the same result?AF
Is it SQL Server 2000?
"AF" <af.at.work@.gmail.com> wrote in message
news:1170683093.895427.186510@.h3g2000cwc.googlegroups.com...
> I`m trying to setup an alert in Windows to shoot an email when the
> connections on SQL server exceed a preset amount. The alert will fire
> a bat file that executes an OSQL script that sends the email alert.
> When I test the .bat file alone it`s fine but when combined with the
> alert monitor nothing happens. Any ideas or is there a better way to
> achieve the same result?
>|||On Feb 5, 8:52 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> AF
> Is it SQL Server 2000?
> "AF" <af.at.w...@.gmail.com> wrote in message
> news:1170683093.895427.186510@.h3g2000cwc.googlegroups.com...
> > I`m trying to setup an alert in Windows to shoot an email when the
> > connections on SQL server exceed a preset amount. The alert will fire
> > a bat file that executes an OSQL script that sends the email alert.
> > When I test the .bat file alone it`s fine but when combined with the
> > alert monitor nothing happens. Any ideas or is there a better way to
> > achieve the same result?
Yes, sorry it is SQL 2000 Enterprise on Windows Server 2003 Enterprise.|||How about downloading xp_smtp_sendmail from www.sqldev.net, and schedule a job which does a SELECT
COUNT(*) FROM sysprocesses and if > desired number you send the email using xp_smtp_sendmail?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"AF" <af.at.work@.gmail.com> wrote in message
news:1170684161.788906.278200@.a34g2000cwb.googlegroups.com...
> On Feb 5, 8:52 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
>> AF
>> Is it SQL Server 2000?
>> "AF" <af.at.w...@.gmail.com> wrote in message
>> news:1170683093.895427.186510@.h3g2000cwc.googlegroups.com...
>> > I`m trying to setup an alert in Windows to shoot an email when the
>> > connections on SQL server exceed a preset amount. The alert will fire
>> > a bat file that executes an OSQL script that sends the email alert.
>> > When I test the .bat file alone it`s fine but when combined with the
>> > alert monitor nothing happens. Any ideas or is there a better way to
>> > achieve the same result?
> Yes, sorry it is SQL 2000 Enterprise on Windows Server 2003 Enterprise.
>|||On Feb 5, 10:03 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> How about downloading xp_smtp_sendmail fromwww.sqldev.net, and schedule a job which does a SELECT
> COUNT(*) FROM sysprocesses and if > desired number you send the email using xp_smtp_sendmail?
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "AF" <af.at.w...@.gmail.com> wrote in message
> news:1170684161.788906.278200@.a34g2000cwb.googlegroups.com...
> > On Feb 5, 8:52 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> >> AF
> >> Is it SQL Server 2000?
> >> "AF" <af.at.w...@.gmail.com> wrote in message
> >>news:1170683093.895427.186510@.h3g2000cwc.googlegroups.com...
> >> > I`m trying to setup an alert in Windows to shoot an email when the
> >> > connections on SQL server exceed a preset amount. The alert will fire
> >> > a bat file that executes an OSQL script that sends the email alert.
> >> > When I test the .bat file alone it`s fine but when combined with the
> >> > alert monitor nothing happens. Any ideas or is there a better way to
> >> > achieve the same result?
> > Yes, sorry it is SQL 2000 Enterprise on Windows Server 2003 Enterprise.
ah, good idea. I will try that.

No comments:

Post a Comment