开发者

How to identify if sql server 2005 express is installed using cmd

How to identify if sql server 2005 express is installed us开发者_开发技巧ing cmd


As a dirty hack, you can check whether sqlcmd command can be executed.

EDIT

yep, I was right.

To determine if you have MSDE or Microsoft SQL Server installed on your computer:

  1. On the taskbar at the bottom of your screen, click Start, and then click Search.
  2. In the Search dialog box, type sqlservr.exe
  3. Click OK.

    If this file is present on your system, then you have MSDE or SQL Server installed.

http://www.microsoft.com/security/updates/checkversion.aspx


It is not using a comman or sqlcmd but this will get you the version of the named server

using (var connection = new SqlConnection("Data Source=localhost;Integrated Security=true;initial catalog=master"))
{
    connection.Open();
    string version = connection.ServerVersion;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜