LocalDB parent instance version invalid: MSSQL13E.LOCALDB
Asked Answered
G

6

41

I'm unable to add a database on a developer machine. I'm running win 10, visual studio 2015. I re-installed SQL server 2016 twice, last time with firewall disabled it all gave green marks in the end.

While i can create databases in VS2015 SQL server object explorer. I am unable to add a SQL database(S) to my projects, trough solution explorer.

Each time i try to add a database to a project i get event 527 SQLLocalDB 12.0 LocalDB parent instance version is invalid: MSSQL13E.LOCALDB

I've tried Start > Run > cmd > sqlcmd -L and it shows my SQLserver

Also made sure it uses the right ports as by (Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?)

i think that SQL is installed properly but that something is not allowing me to add databases (maybe because some root database?? is missing or so i am not sure i m not an export on SQL, but as the error says some DB seams missing ??

Guimar answered 13/10, 2016 at 13:43 Comment(1)
think i solved it, it turns out the local network card was disconnected, while my developer laptop usually runs on WIFI, project explorer apparantly communicated over LAN not over wifi.. thus it couldnt find SQL. it seams to work now, keeping finger crossed as i have not yet tested to code against it.Guimar
U
83

It happened to me when my LocalDB got updated (probably by Visual Studio installer)
I've recreated the instance using the following steps in PowerShell console:

λ SqlLocalDB delete MSSQLLocalDB
LocalDB instance "MSSQLLocalDB" deleted.

λ SqlLocalDB create MSSQLLocalDB
LocalDB instance "MSSQLLocalDB" created with version 13.1.4001.0.

λ SqlLocalDB start MSSQLLocalDB
LocalDB instance "MSSQLLocalDB" started.
Udall answered 9/10, 2018 at 11:46 Comment(4)
probably one of the easiest ways to go around this problemNordau
worked for me and I'd say this is the preferred way to solve it. it clearly was an issue on my dev machine because on a new machine I've got no conflictsFirearm
Works on 14 too : LocalDB instance "mssqllocaldb" created with version 14.0.3391.2.Ima
works with 15.0.4153Megavolt
R
46

I had something similar and deleted any keys in: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SQL Server\UserInstances that did not have the correct ParentInstance key such as MSSQL13E.LOCALDB.

No need to reinstall or reboot.

Removed answered 29/4, 2017 at 7:47 Comment(1)
Bob-on, this. I had SQL 2016 Local DB listed in my "add remove", got shot of that, installed just the LocalDB components of SQL 2017 Express, hit this issue, removed a GUID-named key under that folder - all working :-)Bittencourt
B
22

I had the same problem for migrating from SQL LocalDb 2016 to 2017.

I simply changed the value of the ParentInstance key from MSSQL13E.LOCALDB to MSSQL14E.LOCALDB and it worked !

Ty for pointing me to the key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SQL Server\UserInstances

Benefield answered 19/12, 2017 at 9:58 Comment(0)
N
10

I needed to change my install of Microsoft SQL Server LocalDB 2016 Express to 2014, so I uninstalled 2016 then installed 2014. After this I got the following error when ever I tried to attach a database:

LocalDB parent instance version is invalid: MSSQL13E.LOCALDB

To resolve the issue I uninstalled all mention of Microsoft SQL Server 2016 from my computer then deleted the related instance GUIDs from the following registry location, rebooted, installed 2014 LocalDB and all was good:

HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances\
Norty answered 16/12, 2016 at 13:41 Comment(1)
the registry location for me was : HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\UserInstancesDramatization
S
0

I had the same problem after upgrading, Just delete the registry item and restart the OS. I deleted all folders under:

HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances\ 

…and then restarted Windows.

Sissy answered 18/7, 2022 at 18:51 Comment(0)
W
-2

Remember update the Register:

HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances

Check .DEFAULT

I have to do that, because it was wrong and need it to work in Windows Server 2012.

Wentz answered 13/5, 2019 at 0:23 Comment(1)
Welcome to stackoverflow. Please explain what your answer adds to the existing significant answers.Cacique

© 2022 - 2025 — McMap. All rights reserved.