Solved

How many sql server in the network?

Posted on 2002-06-27
2
146 Views
Last Modified: 2010-05-03
Hi All,

How would I know how many SQL servers (server name) in the network?

Sean.
0
Comment
Question by:whsean
2 Comments
 
LVL 3

Accepted Solution

by:
DrMaltz earned 50 total points
ID: 7115619
there's an API called NetServerEnum which will enumerate the number of SQL Servers broadcasting on the network (Named Pipes a protocol). You can pass an option to this function that finds any server running Microsoft SQL Server.  Here's an article.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/ntlmapi2_1vl9.asp

Here's an article showing how to accomplish from vb.. http://www.codeguru.com/vb/articles/1916.shtml

Also, you can take a look at the SQL DMO Object. Using the SQL-DMO object model you can programmatically control SQL Server.  It contains a method ListOfAvailableServers.

Hope this helps.
Good Luck

DrMaltz
0
 

Author Comment

by:whsean
ID: 7117728
Thanks a million!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question