List of Servers
-
Hi, I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this?? regards Mubashir
Every job is a self portrait of the person who did it.
I haven't seen a pure ADO.NET solution for this (I guess this is what you're looking for) but if you can't find such a solution there as an alternative way.. SQLDMO object! Here SQLDMO.Application you'll find a method called ListAvailableSQLServers! Just add a reference to your project and create an instance of it and you've got your list.
-
I haven't seen a pure ADO.NET solution for this (I guess this is what you're looking for) but if you can't find such a solution there as an alternative way.. SQLDMO object! Here SQLDMO.Application you'll find a method called ListAvailableSQLServers! Just add a reference to your project and create an instance of it and you've got your list.
-
thanks, I tried it but it is returning 0 servers. Why is this so? I am using Windows XP and SQL Server 2000. regards Mubashir
Every job is a self portrait of the person who did it.
There are several possible reasons for this.. The database might be hidden - to check open sql manager and select the properties by right clicking on the protocols node of the db instance. Look for "HideInstance".. It could also be that you're running into a latency problem, if your server isn't responding fast enough you won't see it. But it would say this is unlikely on "localhost"! If this still doesn't help, you might want to use a workaround. You could easily enumerate this registry key: SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances
-
There are several possible reasons for this.. The database might be hidden - to check open sql manager and select the properties by right clicking on the protocols node of the db instance. Look for "HideInstance".. It could also be that you're running into a latency problem, if your server isn't responding fast enough you won't see it. But it would say this is unlikely on "localhost"! If this still doesn't help, you might want to use a workaround. You could easily enumerate this registry key: SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances
Thanks for your quick help... i tried SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances, but it doesnt contains Server Information registered in a SQL Server Group. How can I get that :( ? regards Mubashir
Every job is a self portrait of the person who did it.
-
Hi, I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this?? regards Mubashir
Every job is a self portrait of the person who did it.
Can this be done running in the normally restricted rights of an IIS client?