I need to restore a backup for an assignment, but SMSS said I was running v13 while the backup was made in v15. So I download and installed SQL Server Express 2019 and uninstalled the older version.

However, SMSS can't connect anymore to (localdb)\MSSQLLocalDB.

I read somewhere to add a firewall rule for sqlservr.exe. When I try to run that file manually, it says the SQL Server installation is corrupt.

So I ran the Repair from SQL Server Installation Center, everything was okay in the output log but still no luck. I'm pretty clueless, any help is appreciated.

Edit - the available services:

Status Name DisplayName
Stopped SQLAgent$SQLEXP... SQL Server Agent (SQLEXPRESS)
Stopped SQLBrowser SQL Server Browser
Running SQLWriter SQL Server VSS Writer

The list of LocalDb instances:


PS C:\Program Files\Microsoft SQL Server\150\Tools\Binn> SqlLocalDb.exe s "MSSQLLocalDB"
Start of LocalDB instance "MSSQLLocalDB" failed because of the following error:
Cannot create an automatic instance. See the Windows Application event log for error details.

Event viewer details: LocalDB parent instance version is invalid: MSSQL13E.LOCALDB

  • in Powershell run get-service *sql* and add the results to your question to see if you have service-based install of SQL Server. To list the SQL 2019 ocaldb instances run "C:\Program Files\Microsoft SQL Server\150\Tools\Binn\SqlLocalDB.exe" i – David Browne - Microsoft Feb 28 at 20:26
  • @DavidBrowne-Microsoft Info added to post. Also I get an error when I manually try to start MSSQLLocalDB. – FDM Feb 28 at 20:55
  • It seems LocalDb still refers to something that's become invalid. – FDM Feb 28 at 20:58
  • Managed to get it working after deleting and recreating the instance - solution found at stackoverflow.com/questions/40022742/…... Thanks @DavidBrowne-Microsoft – FDM Feb 28 at 21:06

check the

SQL Server Configuration Manager see manual

enter image description here

On the right side you see which server are running and how to call them in the brackets.

and see if it is called MSSQLLocalDB any longer

  • Ok, so SQLEXPRESS is accessible as before, but I would need/like to use localdb/MSSQLLocalDB – FDM Feb 28 at 20:48
  • then you have to add a new instance with that name and copy all data – nbk Feb 28 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.