SqlLocalDb Versions - Windows API call RegGetValueW returned error code

less than 1 minute read

I’ve met this error when I check the version of SQL Server LocalDb in my machine.

>sqllocaldb.exe versions


When I check the registry.

  1. Current version

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13E.LOCALDB\MSSQLServer\CurrentVersion

  1. Installed version

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions

The two versions are inconsistent.

When I change the installed version folder name from “13.0” to “13.1”, the problem is solved.

Check the SQL Local Db version again in cmd, the version is correctly displayed.

SUN Jiangong

SUN Jiangong

A senior .NET engineer, software craftsman. Passionate about new technologies.