Click here to Skip to main content
14,427,400 members
Rate this:
Please Sign up or sign in to vote.
See more:
I would like check the current system has SQL 2014 (Exactly this version of SQL). So I plan to check the registry side to make sure the system has installed SQL 2014. I would need the exact registry path to check SQL 2014. The same registry path need to remove after uninstalling the SQL 2014.

Please provide the registry path which I need to check.

Thanks in advance!!!!

What I have tried:

I have verified the below path but I am not sure this one is correct or not.
HKEY_LOCAL_MACHINE\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SQL Server\\120\\SQLServer2014\\CurrentVersion\Version
Posted
Updated 26-Feb-19 8:21am
Comments
Richard Deeming 26-Feb-19 13:55pm
   
Why "exactly 2014", and not "2014 or later"? If anything in your database breaks in a later version, you just need to set the compatibility level.

ALTER DATABASE Compatibility Level (Transact-SQL) - SQL Server | Microsoft Docs[^]

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

[EDIT#3]

Check this: File Locations for Default and Named Instances of SQL Server - SQL Server | Microsoft Docs[^]
Sql Server 2014 code is 120, so registry key is:
HKLM\Software\Microsoft\MicrosoftSQL Server\120


Quote:
Common files used by all instances on a single computer are installed in the folder <drive>:\Program Files\Microsoft SQL Server\nnn\. <drive>



[Initial post]
I have no idea which registry entry is responsible to store such of information, but you can enumerate all instances of MS SQL server in LAN (even on local computer). See: How to enum SQL Server instances in network[^]

Note: please, read additional information about method used in that trick from MSDN: SqlDataSourceEnumerator.GetDataSources Method (System.Data.Sql) | Microsoft Docs[^]


[EDIT#2]
I also recommend to read this: https://blog.sqlauthority.com/2016/11/12/sql-server-get-list-sql-server-instances-installed-machine/[^]
Dave recommeds to use PowerShell command:
Get-ItemProperty ‘HKLM:\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL’

or
Get-Service | ?{ $_.DisplayName -like "SQL Server (*" }
   
v5
Comments
vasanthkumarmk 26-Feb-19 13:35pm
   
Thanks for reply, I am checking this from InstallShield code. Which means on the time of installing the setup I am doing such kind of validations. so we have only one option to check the exact registry path.
vasanthkumarmk 26-Feb-19 13:44pm
   
But in my case, I would like to know exactly user has installed SQL, very particularly 2014.
vasanthkumarmk 26-Feb-19 13:47pm
   
Say for example, using this registry path, ("\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5") I have verified dotnet framework 3.5 has installed in current machine. Same like that I need to know user installed SQL 2014 or not.
vasanthkumarmk 26-Feb-19 14:19pm
   
This one very helpful.
Maciej Los 26-Feb-19 14:34pm
   
I'm glad i can help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100