Home All Groups Group Topic Archive Search About

Instances list on remote IP

Author
8 Dec 2005 6:11 PM
christof
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!!!

Author
24 Jan 2006 12:16 AM
Ryan Riehle
I had the same problem and it turned out to be that the firewall is blocking
the packets.  I think one needs to have UDP 1343 open outbound, but unless I
turn off the firewall I still do not get non-local server instances in the
enumeration;  The data seems to be sent back on random UDP ports > 2700, (the
port range is not confirmed) and I'm not sure if one can specify ranges using
the built-in Windows XP SP2 firewall.

If anyone has a solution for this that lets me use the same firewall and
still get the enumeration, please reply. I'm curious.


Show quote
"christof" wrote:

> 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!!!
>

AddThis Social Bookmark Button