February 11, 2004 at 12:01 pm
When I go out on our network to register a new SQL Server I will see many more entries than I expected. I know some of these are MSDE and some are SQL Server but how do I know which is whech? Is there an easy way to tell or a query I can run that will indicate whether it is MSDE or SQL Server?
February 11, 2004 at 2:48 pm
select @@version
good luck
February 11, 2004 at 5:19 pm
select @@version I knew but many of these boxes I don't have access to. I am expected to be able to list which are SQL Servers and which are MSDE with very limited access to the box. HELP!!!!!!
February 12, 2004 at 1:03 am
May be you could try the following: Open a DOS window and do oSQL -L to get a list of servers. And then run osql -E -S -Q \"SELECT "@@version\". If you don't have access to the server then too bad you can't do anything. You could also invoke this osql command from a script that would substitute each of the server names.
February 12, 2004 at 7:08 am
Another way is to create a .NET Remoting App which runs as a Service on each PC running SQL Server or MSDE. Then, from another PC (your Main PC?) an application can call the Remoting App on whatever Server has it installed and the Remoting app will return what Version of SQL is running. This type of application would take about 2 days to develop and install.
There is a way to get around the @@Version, but you'll need to have access to the Windows Registry. Since a Windows Service running the Remoting app would, you shouldn't have a problem reading the Registry.
1.) Look for "HKEY_LM\Software\Microsoft\Microsoft SQL Server\80"
2.) If there is a Key called "CSDVersion" under "HKEY_LM\Software\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup\CurrentVersion", that is the Version of MSDE!
3.) If "CSDVersion" does not exist, then you'll find the Version under the "CurrentVersion" Key for SQL Server Standard, Developer, and Enterprise(?).
The Remoting App would simply read from the Registry and return the Version.
Or -- since the Remoting App is installed on each "Server", it can simply Log into the SQL Server using Windows Authentication, run the Query (Select @@Version) and return the Version!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply