471,598 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 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 3302
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Chuck | last post: by
9 posts views Thread by jab | last post: by
6 posts views Thread by Ken Allen | last post: by
7 posts views Thread by jane | last post: by
2 posts views Thread by Don Rich | last post: by
8 posts views Thread by =?Utf-8?B?UGV0ZXI=?= | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

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.