http://www.sqlservercentral.com/blogs/brian_kelley/2006/07/29/detecting-sql-server-2005-properly/

Printed 2014/10/21 02:50AM

Detecting SQL Server 2005 Properly

2006/07/29

There is a new post in the SQL Server Express blog which indicates the right way to detect SQL Server 2005: Using WMI. The blog post is here:

FAQ: Detecting SQL Server 2005 using WMI

Relying on file paths don't work because file paths can always be altered at install, especially if the database server is SQL Server Express and it's coming packaged with an application. That leaves the registry as the way most people go. However, the post points out that Microsoft reserves the right to change the registry and that they did so between 2000 and 2005. This is true, the registry has changed between these two versions, and it changed between SQL Server 7.0 and 2000 as well. Therefore, WMI is the way to go for detecting SQL Server 2005. This won't help you detect SQL Server 7.0 and 2000 instances, as the SQL WMI Provider doesn't support these older versions, but a tool like SQL Recon does detect these versions using all known available methods (depending on your permissions on the remote system).



Technorati Tags: | | | | |


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.