Showing posts with label runing. Show all posts
Showing posts with label runing. Show all posts

Monday, March 12, 2012

Find out whether SQL Server services are runing or not - SP4

Is that possible by querying the SQL Server , to find whether the listed

below there services are running or not?

1. SQL Server

2. SQL Agent

3. MSDTC

No. It is best to do this outside of the database. You can use NT command-line utilities or WMI to do this easily.|||So basically you can run some command-line tool in xp_cmdshell and parse its output, but that is rather lame. :)|||

Let me give some ideas on how WMI ot NT Utilities can be used.

For NT Utilities command are referring command "sc".

Basically I have 100 boxes running with SQL Servers. I want myself to be get alerted when any of the SQL Server instances services stopped.

As all these boxes are production, I am not supposed to create / change anything on these boxes. I have to query those boxes remotly and find out whether SQL Server services are running or not.

Please note there would be some named instances too.

Find out whether SQL Server services are runing or not

Is that possible by querying the SQL Server , to find whether the listed

below there services are running or not?

1. SQL Server

2. SQL Agent

3. MSDTC

No. It is best to do this outside of the database. You can use NT command-line utilities or WMI to do this easily.|||So basically you can run some command-line tool in xp_cmdshell and parse its output, but that is rather lame. :)|||

Let me give some ideas on how WMI ot NT Utilities can be used.

For NT Utilities command are referring command "sc".

Basically I have 100 boxes running with SQL Servers. I want myself to be get alerted when any of the SQL Server instances services stopped.

As all these boxes are production, I am not supposed to create / change anything on these boxes. I have to query those boxes remotly and find out whether SQL Server services are running or not.

Please note there would be some named instances too.