Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LocalDB parent instance version invalid: MSSQL13E.LOCALDB

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 ??

like image 517
Peter Avatar asked Oct 13 '16 13:10

Peter


People also ask

What is SQL Server 2017 LocalDB?

Microsoft SQL Server Express LocalDB is a feature of SQL Server Express targeted to developers. It is available on SQL Server Express with Advanced Services. LocalDB installation copies a minimal set of files necessary to start the SQL Server Database Engine.


2 Answers

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.

like image 66
Dick de Reus Avatar answered Sep 25 '22 10:09

Dick de Reus


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. 
like image 43
Random Avatar answered Sep 21 '22 10:09

Random