Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Sql Service

Author  Topic 

ijprasad
Starting Member

29 Posts

Posted - 2006-08-28 : 06:24:15
Hi all,

I need the solution for the following.

How can we find sql server service are running on server B from Server A using Sql statements.

Thanks for helping me

Inderjeet

panthagani
Yak Posting Veteran

58 Posts

Posted - 2006-08-28 : 06:36:18
You can use the xp_cmdshell proc which executes a command line via the OS shell. I've used it to start/stop Windows services. Check it out in BOL and you may find your options.
Go to Top of Page

ijprasad
Starting Member

29 Posts

Posted - 2006-08-28 : 06:38:38
BOL talks about current system not remote system.

Inderjeet
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-08-28 : 07:23:43
Try this
SELECT top 1 a.number
FROM OPENROWSET('SQLOLEDB','remoteserver';'sa';'sa_Password',
'SELECT * FROM master.dbo.spt_values') AS a

Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -