SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Sql Service
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

ijprasad
Starting Member

India
29 Posts

Posted - 08/28/2006 :  06:24:15  Show Profile  Send ijprasad an AOL message
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 - 08/28/2006 :  06:36:18  Show Profile
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

India
29 Posts

Posted - 08/28/2006 :  06:38:38  Show Profile  Send ijprasad an AOL message
BOL talks about current system not remote system.

Inderjeet
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30104 Posts

Posted - 08/28/2006 :  07:23:43  Show Profile  Visit SwePeso's Homepage
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

Edited by - SwePeso on 08/28/2006 07:24:19
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000