How to identify if sql server 2005 express is installed using cmd
A:
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:
- On the taskbar at the bottom of your screen, click Start, and then click Search.
- In the Search dialog box, type sqlservr.exe
Click OK.
If this file is present on your system, then you have MSDE or SQL Server installed.
Sorantis
2010-02-16 11:51:04
A:
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;
}
Sky Sanders
2010-02-16 11:56:17