Sql Localdb Automatic Instance Startup Failure When Called from Visual Studio 2013, But Not SQL Server Management Studio

Cannot start localdb on startup

The localDB instance should start up when you first try to access the database. After a few minutes of inactivity, the instance will close and only start again when you try to access the database.

There should be no need to "manually" start localDB, although I have noticed sometimes that the application does not automatically start, though this is intermittent and I can find no explanation for it.


In order to try to start LocalDB when the application first loads, put this in your Program.cs file, in the Main() function:

Process.Start("sqllocaldb.exe", "start v11.0");

This will attempt to spin-up the localDB exe on application startup.

Visual Studio 2013 does not create SQL Server 2014 LocalDB database

I found the solution.

Removed the existing database. Created a new database SQL Server Management Studio 2014. Placed it in the solutions folder. Connected to that database through Server Explorer: set Server Name: to (localdb)\MSSQLLocalDB and Attach a database name: to the .mdf file.

Cannot start LocalDB

When all else fails and you don't care about data loss, delete and recreate your LocalDB\v11.0 database! At the command prompt

sqllocaldb delete v11.0
sqllocaldb create v11.0

(Sqllocaldb is in your PATH right? It was for me.)

Related Topics

Leave a reply