Querying services | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Querying services

Is it possible to query the status of the SQL Server service or the SQL Agent service of one server from another? I want to be able to setup a check that keep track of my servers, starting with just whether or not they are running. Does anyone have any other ideas? Thanks
How about Enterprise Manager?
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
You can run NET START MSSQLSERVER from the shell. It will return the following message if the service is running: "The requested service has already been started." You can do this for any service. The downside of course is that it will start the service if it’s not started already. MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
i have a doubt over here. what if i do not have all components installed or i do not have SQL server installed at all??? Is is then possible to query the service status from a single computer.?? regards, Chetan
At least you have to install SQL tools in a single computer.
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
You can still query the service status from shell. It will just give you the following message: "The service name is invalid" Again, once you’ve captured the message, you can do whatever you want. Luis, you don’t necessarily need to have SQL Tools or even SQL Server installed to run the tests. It can be any service that runs on the computer to perform the tests. MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
What I am really needing is a way to make sure that all of my SQL Servers are still up and running. I have so many that it’s difficult and time consuming to go out and look at each one. I obviously can not count only a email or report from a server that it is having problems. If it goes down it won’t be able to tell me. I would like a way to query the state of server one from server two. That way I could have redundancy in place so that server one is checked by servers two, three and four. I would only get a report when one of them failed to get a response from server one. I know that there are many third party monitoring software packages that would provide the type of check I’m looking for but I would really like to just build my own. I hope this helps to explain what I am looking for. Thanks
I give you that.<br />Two things:<br /><br />1) I give my answer according what I suppose the guy knows about it.<br />2) What the ****** are you doing in Forum on sunday?. Yeap, I’m creazy too[<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />].<br /><br /><br /><br /><br />Luis Martin<br />Moderator<br />SQL-Server-Performance.com<br /><br /><font size="1">One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important<br />Bertrand Russell<br /></font id="size1"><br /><br /><font size="1">All postings are provided “AS IS” with no warranties for accuracy.</font id="size1"><br /><br /><br /><br />
My last post was to Derrick. Now, about last question, you can use shell to know it or GUI tools like EM or SQL Diagonistic Manager 3rd party tools.
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
Can you query the status from shell or only issue a net start command?
Check: http://msdn.microsoft.com/library/en-us/adminsql/ad_1_start_5qih.asp
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
]]>