473,320 Members | 2,054 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,320 software developers and data experts.

SQL server instances list on remote IP

I've asked on sql.programming, but got no answer:

Is there a way to get all the SQL Server instances with SQL SMO from a
remote computer?

I got few instances on some remote IP and
how to list them, how to pass to the function this address - could it be
done at all?

Second question:

Locally I'm using SmoApplication.EnumAvailableSqlServers, but
I've got SQLEXPRESS and MSDE SP 4, and got MYCOMPUTERNAME\SQLEXPRESS and
MYCOMPUTERNAME\MSDE2000 but if I do that:

DataTable dt = SmoApplication.EnumAvailableSqlServers(false);

if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
ddlSQLServerInstances.Items.Add(new
ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
}
}

In my dropdownlist appears only MYCOMPUTERNAME, nothing more...

I'll be happy for any suggestions.

Thank you!!!
Dec 9 '05 #1
2 3390
Hi,

No idea really if you can do this directly, but maybe a possible way is
using WMI in the remote computer. Take a look at WMI and see if you can
enumerate the sql servers that way.

IIRC in VS.NET you can do it, so it can be done :)

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"christof" <no****@nomail.de> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I've asked on sql.programming, but got no answer:

Is there a way to get all the SQL Server instances with SQL SMO from a
remote computer?

I got few instances on some remote IP and
how to list them, how to pass to the function this address - could it be
done at all?

Second question:

Locally I'm using SmoApplication.EnumAvailableSqlServers, but
I've got SQLEXPRESS and MSDE SP 4, and got MYCOMPUTERNAME\SQLEXPRESS and
MYCOMPUTERNAME\MSDE2000 but if I do that:

DataTable dt = SmoApplication.EnumAvailableSqlServers(false);

if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
ddlSQLServerInstances.Items.Add(new
ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
}
}

In my dropdownlist appears only MYCOMPUTERNAME, nothing more...

I'll be happy for any suggestions.

Thank you!!!

Dec 9 '05 #2

"christof" <no****@nomail.de> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I've asked on sql.programming, but got no answer:

Is there a way to get all the SQL Server instances with SQL SMO from a
remote computer?

I got few instances on some remote IP and
how to list them, how to pass to the function this address - could it be
done at all?

Second question:

Locally I'm using SmoApplication.EnumAvailableSqlServers, but
I've got SQLEXPRESS and MSDE SP 4, and got MYCOMPUTERNAME\SQLEXPRESS and
MYCOMPUTERNAME\MSDE2000 but if I do that:

DataTable dt = SmoApplication.EnumAvailableSqlServers(false);

if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
ddlSQLServerInstances.Items.Add(new
ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
}
}

In my dropdownlist appears only MYCOMPUTERNAME, nothing more...

I'll be happy for any suggestions.

Thank you!!!


What exactly do you mean by - appears only MYCOMPUTERNAME ?
How many name" do you have in your drop down list, 1 or 2.
What client and server side protocols do you have enabled? TCP/IP, Named
pipes, memory mapped?
Note that named pipes and memory mapped cannot be used for remote
connections from client to server.
What are the versions of the "remote" SQL servers? MSDE versions cannot be
used remotely.

Willy.
Willy.
Dec 9 '05 #3

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

Similar topics

11
by: Chuck | last post by:
Is there a command that will list all of the databases for a particular instance on the local machine, whether they are activated or not? If there is no such command, is there at least a way to...
9
by: jab | last post by:
Je veux lier (join) une table qui se trouve dans une database avec une qui se trouve dans une autre database. Les 2 databases sont sur le même serveur en l'occurence DB2/NT 7.2.9. J'ai créé un...
6
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
7
by: jane | last post by:
HI, I have a question... I have a bunch of instances... Is there any way to tell which instance is client instance? Your help is very appreciated. Thanks.
0
by: Jerry Spivey | last post by:
Hi, I'm a SQL Server DBA and I'm trying to get a listing of the SQL Servers on the network. I installed Visual Basic 2005 Express edition and used the SQL Server 2005 ServerInfo sample which...
2
by: Don Rich | last post by:
Here's the scenario. A user is sitting at a WinXP workstation and maps a drive to one particular remote server. The user then transfers data files to that server and invokes my C++ application...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
8
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to get a list of SQL Server Instances thru a VB.NET application. I have tried GetDataSource and SMO. I have also tried using ListSQLSvr.exe from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.