August 19, 2003 at 3:01 pm
We have a couple of servers running SQL Server instances.
How do I monitor whether an instance on a specific server is up or down?
We want to do the above monitoring through a windows script.
The script should be running on the server and when the SQL instance is down, the script should send e-mail to dba group.
Please inform me how to write this type of script?
If any of you have this type of script, please share the script with me.
I would be thankful for your help in this.
Rao
August 19, 2003 at 3:45 pm
There are a number of ways. You could make a call to isql and see if it returns data. You could monitor the server, srvinfo.exe will tell you if an instance is running.
As far as the email, you'd need some email program. If this is on a server, then if the SMTP service is running, you could use that.
Steve Jones
August 19, 2003 at 3:59 pm
Thank you Steve for quick reply.
I could not find the program - srvinfo.exe on the server.
Could you please tell whether I need to download this program? if yes, which location?
Once again, Thanks for the help.
Rao
August 19, 2003 at 8:32 pm
SRVINFO.EXE is on the Windows Resource Kit CD.
Summary of the utilities on this CD (part of Technet) is available at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;158388
August 20, 2003 at 4:08 pm
Thank you Steve for your help in this.
I am getting this CD and would install the srvinfo.exe.
Thanks again Steve,
Rao
August 24, 2003 at 8:54 am
We go a step further because we've had cases where the MSSQLSERVER service (and the MSSQL$<Instance Name> services) have been up when you check the service but for whatever reason they aren't accepting connections. Basically we make an ADO connection to each server. Should the ADO connection fail, we flag that server and an email goes out.
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
K. Brian Kelley
@kbriankelley
August 25, 2003 at 4:08 am
A variation of this is to open and hold an ADO connection. If you use the events associated with the connection, one event will fire as soon as the connection drops, so you get almost instant notification.
Andy
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply