473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hot to enumarate SQL servers in my network?

Hi.
I'm interesting how to enumerate available SQL servers in the network from
code in C#. It may be done in C++ using WINAPI function NetServerEnum. If
there is no way except importing this function from DLL, help to write C#
declarations please.
Thanks.
Nov 16 '05 #1
3 2655
http://www.codeproject.com/cs/database/LocatingSql.asp

HTH

"Dmitry" <di*****@yandex.ru> wrote in message
news:rw****************************@40tude.net...
Hi.
I'm interesting how to enumerate available SQL servers in the network from
code in C#. It may be done in C++ using WINAPI function NetServerEnum. If
there is no way except importing this function from DLL, help to write C#
declarations please.
Thanks.
Nov 16 '05 #2
On Wed, 27 Oct 2004 19:21:58 +0530, Shiva wrote:
http://www.codeproject.com/cs/database/LocatingSql.asp

HTH

"Dmitry" <di*****@yandex.ru> wrote in message
news:rw****************************@40tude.net...
Hi.
I'm interesting how to enumerate available SQL servers in the network from
code in C#. It may be done in C++ using WINAPI function NetServerEnum. If
there is no way except importing this function from DLL, help to write C#
declarations please.
Thanks.


Hi.
Thanx. Now I realized how to use NetServerEnum. But just a little
question... NetServerEnum searches only servers in my domain. Why Query
Analizer shows more SQL servers and even serves that do not belong to my
domain? How does it work?
Thanks for advices.
Nov 16 '05 #3
This sample uses ODBC32.DLL API:
http://www.codeproject.com/cs/database/LocatingSql.asp

"Dmitry" <di*****@yandex.ru> wrote in message
news:1w******************************@40tude.net.. .
On Wed, 27 Oct 2004 19:21:58 +0530, Shiva wrote:
http://www.codeproject.com/cs/database/LocatingSql.asp

HTH

"Dmitry" <di*****@yandex.ru> wrote in message
news:rw****************************@40tude.net...
Hi.
I'm interesting how to enumerate available SQL servers in the network from
code in C#. It may be done in C++ using WINAPI function NetServerEnum. If
there is no way except importing this function from DLL, help to write C#
declarations please.
Thanks.


Hi.
Thanx. Now I realized how to use NetServerEnum. But just a little
question... NetServerEnum searches only servers in my domain. Why Query
Analizer shows more SQL servers and even serves that do not belong to my
domain? How does it work?
Thanks for advices.
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: nmac | last post by:
Hi all, hopefully someone can offer some sagely advice regarding Production use of Jakarta's Tomcat. First, some brief background. My company have a servlet application that connects to a MySQL...
22
by: Jason James | last post by:
Hi all, I have asked this question already, but this time I will ask it a different way. My MSDE service is running fine. However, when I try and browse my list of servers I get two...
7
by: steve | last post by:
Can you join two tables across different servers in mySQL, or am I dreaming of Oracle? -- Posted using the http://www.dbforumz.com interface, at author's request Articles individually checked...
5
by: Oliver Braun | last post by:
I know this is a very common issue and I found a lot of hints on this topic in www but I did not find a very good solution for this task. Most of the solutions use SQLDMO to list all sql servers...
0
by: zurg | last post by:
I need to enumerate ALL connections I can see in 'Network Connections' folder (active/non-active). Using NetSharingManager I get only LAN connections. Any information how get these connection (for...
1
by: Roger | last post by:
I would like to get a list of machines on my network (Workstations and/or Servers). Is there a way to do this in VB.Net? Thanks, Rog
1
by: Anna | last post by:
Hello, I want to enumarate all resources from executable file. in that I Got a article where it enumarate all resources but I want more than that, As I want to enumarate also resources...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
24
by: Asja | last post by:
I have written an application that runs in a kind of peer-to-peer framework. Servers connect to a masterserver, which a client then queries to receive a list of servers. The client selects a server...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.