Solved

How many sql server in the network?

Posted on 2002-06-27
2
139 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now