2

I would like to get an enum in c# which contains all sql server instances including localdb, at this time I have tried looking in:

- System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources()
- Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer()

both not yielding the localdb instance. However ms server management studio seems to be able to discover it, usualy in (LocalDb)\v11.0

Server names in SQLServer management Thanks for your help!

Aditya Vikas Devarapalli
  • 3,186
  • 2
  • 36
  • 54
Sentinel
  • 197
  • 8
  • 2
    I suspect for localdb, SSMS is using this approach: http://stackoverflow.com/questions/11628316/sql2012-localdb-how-to-check-in-c-sharp-if-it-is-currently-installed – Marc Gravell Oct 30 '13 at 10:07
  • seems kinda vague to be using the existance of a registery key to check the existance. I'm sure the management studio doesn't search for a key to display this enum. But thanks for your reply! – Sentinel Oct 30 '13 at 12:11

0 Answers0