Getting the BizTalk SQL Server DB Name

A quick one. How to get the name of the SQL Server that BizTalk is running? A relatively easy way is to get it from the registry. Heres a code sippet that does just that.


string strBtsSvrSubKey =
"Software\\Microsoft\\BizTalk Server\\3.0\\Administration";
string strBtsSqlSvrKey = "MgmtDBServer";
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(strBtsSvrSubKey);
string strBtsSqlSvrName = key.GetValue(strBtsSqlSvrKey).ToString();

Any queries, post a comment.

Comments

Nimbus said…
The me is back. Since you insist that one has to have a query to post a comment, here's mine — How does one write creative comments on a blog without offending the author, who seems to take his geek-writing pretty seriously?

A code snippet explaining the solution is, of course, always appreciated! :)
Anonymous said…
i saw that debate between u and steve on the MS discussion boards about which was better. registry lookup or WMI? so which is it?

Popular posts from this blog

Using recursion in the In-line XSLT Template type Scripting Functoid

Sending Messages as FORM Variables with the HTTP Adapter