My application lists the available network SQL Servers using
Return SmoApplication.EnumAvailableSqlServers(false)
Until recently, I was running XP Pro, with SQL 2005, SQL 2008, and Visual Studio 2008.
All worked perfectly, correctly listing the default SQL05 server, and the SQL08 named instance.
I've now upgraded to Windows 7 x64, Visual Studio 2010, together with SQL 2005 and 2008.
A little while after the installation, the application stopped detecting the SQL05 server, although it continued to see the SQL08 named instance. I couldn't find anything obviously wrong, and uninstalled, then reinstalled, VS2010, and SQL05/8.
This fixed the problem, but only temporarily - now I'm back to finding that it only detects the SQL08 named instance.
If it's relevant, the installation was in the following order:
SQL 2005, SQL 2008, VS 2010
It was the VS2010 install that created the following folder:
D:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\
...from which I'm using refs to Microsoft.SqlServer.Smo.dll
(v 10.50.1447.4), among other things.
Any suggestions would be gratefully received. I do have SQL Browser running, as well as the server services themselves.
Update:
I've just noticed that if I stop the SQL Browser service, EnumAvailableSqlServers(false)
now only returns the SQL05 default instance.
If I restart it, it returns only the SQL08 named instance.
Any idea why the default SQL05 server isn't being returned ?