Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / April 2006

Tip: Looking for answers? Try searching our database.

HOWTO: List SQL Servers on Local Machine

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 10 Apr 2006 15:37 GMT
Hi All,

I need to retrieve a list of SQL servers that are running on a local machine.

I have tried using:
  SqlDataSourceEnumerator instance = SqlDataSourceEnumerator.Instance;
  System.Data.DataTable table = instance.GetDataSources();
but have found that it returns servers on the entire network not on the
local machine.

Is there some other C# API that can be used to get a list of SQL servers
that are running on the local machine?

Thanks in advance for any help,
Scott
William (Bill) Vaughn - 10 Apr 2006 17:01 GMT
I have used these methods many times to demonstrate access to servers on the
local machine and anywhere else visible on the net. Are the local servers
configured so as to make them "visible"? Is the SqlBrowser service running?
Are the ports and protocols enabled?

Signature

____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

> Hi All,
>
[quoted text clipped - 12 lines]
> Thanks in advance for any help,
> Scott

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.