View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000190 | Heureka | [All Projects] Other | public | 2018-02-26 08:13 | 2018-03-09 16:16 |
Reporter | Peder | Assigned To | Linus | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 2.10.2 | ||||
Target Version | 2.11.0 | Fixed in Version | |||
Summary | 0000190: List all local SQL instances | ||||
Description | När man ska ansluta en databas listas inte alla tillgängliga lokala SQL-Server instanser. Jag använder den här i Treesys-koden (hittade på nätet), den är mycket snabb: public static IList<string> GetSqlServers() { var sqlServers = new List<string>(); RegistryView registryView = Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32; using (RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, registryView)) { RegistryKey instanceKey = hklm.OpenSubKey( @"SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL", false); if (instanceKey != null) { foreach (var instanceName in instanceKey.GetValueNames()) { sqlServers.Add(Environment.MachineName + @"\" + instanceName); } } } return sqlServers; } | ||||
Tags | No tags attached. | ||||
Product | General | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-26 08:13 | Peder | New Issue | |
2018-02-26 09:27 | Peder | Description Updated | View Revisions |
2018-03-09 16:16 | Linus | Assigned To | => Linus |
2018-03-09 16:16 | Linus | Status | new => closed |
2018-03-09 16:16 | Linus | Resolution | open => fixed |
2018-03-09 16:16 | Linus | Note Added: 0000201 |