db-C


...static void Main()
{
// Retrieve the enumerator instance and then the data.
SqlDataSourceEnumerator instance =
SqlDataSourceEnumerator.Instance;
System.Data.DataTable table = instance.GetDataSources(); ...

Hi MS SMO folks,

I'm not getting all instances returned in my table. I know there are issues surrounding this call but I have 1 dev box, 1 nt 2003 server and a total of 3 sql srv instances. 2 of which are on my local dev machine. All are 2005. Both servers have SQL Browser enabled and all protocols are enabled. All of my MacAfee and Windows firewalls are temporarily Off.

The only instance returned is mylocalbox/sqlexpress. I can understand why it may not see the server, due router or other h/w, but what I really don't get is why it doesn't even see my other instance on my local box: mylocalbox/dbcdev1

Is there another more robust method of enumerating all sql instances on a LAN or getting this to work a bit better

Thanks

Jim





Re: SqlDataSourceEnumerator.Instance; not returning all instances

Jens K. Suessmeyer


Hi,

did the call only return one row

HTH, Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---






Re: SqlDataSourceEnumerator.Instance; not returning all instances

db-C

Jens;

Yes the call only returned one row. i.e. The only instance returned is mylocalbox/sqlexpress

I do have another instance on this machine.

Do you have any idea as to why the other named instance was not returned into the datatable

Jim







Re: SqlDataSourceEnumerator.Instance; not returning all instances

Jens K. Suessmeyer

Hi,

have a look in the registry key:

and if all instances are mentioned here.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

There is a know issue if SQL Server Express is installed in the machine. Is SQL Server Express installed

HTH, Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---







Re: SqlDataSourceEnumerator.Instance; not returning all instances

Cristian Rojas C.

Add the servers to file hosts located in Windows\System32\Drivers\Etc