I'm running SQL Server 2000 on a Windows 2000 server. Is there a
simple, straightforward way to create an alert that warns me if the
SQLAgent service does not start after rebooting the server.
I'll appreciate any help!
Per WilliamsonYou can query the status of the service within T-SQL using
an undocumented xp.
xp_servicecontrol 'QUERYSTATUS', 'SQLEXECUTIVE'
Why don't you create an AutoStart proc that will run
everytime SQL Server starts and use xp_servicecontrol to
find out the state of SQLAgent. You might need to build in
a delay as SQLAgent is dependant on SQLServer so SQLServer
will probably run the auto proc while the SQLAgent is
still starting.
If your using xp_smtp_mail rather than xp_sendmail you
will be able to E-Mail an alert, alternitavly you could
use NET SEND i suppose.
HTH
Ryan
>--Original Message--
>I'm running SQL Server 2000 on a Windows 2000 server. Is
there a
>simple, straightforward way to create an alert that warns
me if the
>SQLAgent service does not start after rebooting the
server.
>I'll appreciate any help!
>Per Williamson
>.
>|||Ooops, that was supposed to read xp_send_smtp_mail. If you
haven't used it before here's a good reference.
http://www.sqldev.net/xp/xpsmtp.htm
HTH
Ryan.
>--Original Message--
>You can query the status of the service within T-SQL
using
>an undocumented xp.
>xp_servicecontrol 'QUERYSTATUS', 'SQLEXECUTIVE'
>Why don't you create an AutoStart proc that will run
>everytime SQL Server starts and use xp_servicecontrol to
>find out the state of SQLAgent. You might need to build
in
>a delay as SQLAgent is dependant on SQLServer so
SQLServer
>will probably run the auto proc while the SQLAgent is
>still starting.
>If your using xp_smtp_mail rather than xp_sendmail you
>will be able to E-Mail an alert, alternitavly you could
>use NET SEND i suppose.
>HTH
>Ryan
>>--Original Message--
>>I'm running SQL Server 2000 on a Windows 2000 server. Is
>there a
>>simple, straightforward way to create an alert that
warns
>me if the
>>SQLAgent service does not start after rebooting the
>server.
>>I'll appreciate any help!
>>Per Williamson
>>.
>.
>
No comments:
Post a Comment