30
votes

Cannot start LocalDB instance, I have installed and re-installed over and over.

Keep getting this error :

Start of LocalDB instance "v11.0" failed because of the following error: Error occurred during LocalDB instance startup: SQL Server process failed to start.

Anyone any advice ? ?

Microsoft SQL Server 2012, i have ensured the FULL installation options, stopped all services SQL related and tried restarting .

sqllocal info 

gives me :

Projects v11.0

when i try

sqllocal start v11.0

I get the above error.

11
@Alex answer provides link to informative article that has solution for problem with IIS and LocalDb: stackoverflow.com/a/27257343/237858nikib3ro
@kape123 i did manage to fix the problem.. Removing IIS and MSSQL.. Life has been wonderful since! ^_^Pogrindis
Was sqllocaldb named sqllocal at some earlier point? Or is that a misnomer in OP? Or are sqllocal and sqllocaldb two different tools?Trevor Reid
@TrevorReid It was quite a while ago, but i suspect I was referencing the pipe, the cli should be, today anyway sqllocaldbPogrindis

11 Answers

53
votes

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.)

25
votes

I was getting a similar error, but when running

sqllocaldb start

The local db started successfully. Also when checking the event log I saw an error along the lines of

Windows API call WaitForMultipleObjects returned error code: 575

What fixed it for me:

  1. In IIS, configure the app pool to run under an account with permissions to the DB on the server (advanced options of the app pool)
  2. In the advanced option of the app pool, set Load User Profile to true

Reference: http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx

8
votes

It worths looking at LocalDB log files too, it is more detailed than event log:

%LocalAppData%\Microsoft\Microsoft SQL Server Local DB\Instances\ProjectsV12\error.log

Besides recreating the instance I had to delete the content of this folder:

%LocalAppData%\Microsoft\VisualStudio\SSDT\

This is where I have the mdf and ldf files.

5
votes

Same problem here. Here's how I fixed it using bits of the other solutions posted here.

I had dozens of these errors in the application event log:

Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error}
The application was unable to start correctly (0x%lx). Click OK to close the application.
Reported at line: 3730. 

I realized that I had SQL Server Management Studio installed on my development machine, but no other SQL components. I installed the database engine, shared components, and localdb from SQL Express

https://www.microsoft.com/en-us/cloud-platform/sql-server-editions-express

After installing, I still get the same error in event log :(

Found this article: Cannot start LocalDB

Run the following in cmd to get the localdb instance name: C:> sqllocaldb info

In my install, I had: MSSQLLocalDB ProjectsV13

I ran the following to delete the instances:

sqllocaldb delete MSSQLLocalDB
sqllocaldb delete ProjectsV13

I ran into issues trying to delete/create these (sqllocaldb delete MSSQLLocalDB). I ended up deleting all of the folders and files under '%LocalAppData%\Microsoft\Microsoft SQL Server Local DB\Instances*' (You need to stop SQL Server and kill all sqlserver processes)

Then running 'sqllocaldb create' created and started the default instance and all files.

3
votes

My solution:

Go to: %LocalAppData%\Microsoft\Microsoft SQL Server Local DB\ and allow total control of the folder "Instances" to everyone group.

I know this is not OK but it solved my problem and i don't really care about the data of that folder as this is a developing and testing computer.

1
votes

I had this issue. I was trying to use Windows Authentication through an application, but the IIS App Pool credentials were wrong. I was using my Windows user name (ie: NETWORK\name) as my identity, but I changed it to the built-in "LocalSystem" and it worked.

1
votes

Had this issue suddenly too but saw nothing weird in logs. Was able to get it running by running the following in an administrator command prompt:

sqllocaldb start
0
votes

You should check the Event Log for additional information.

Product Name
SQL Server

Product Version 11.0

Product Build Number

Event ID
266

Event Source
SQL Server Local Database Runtime 11.0

Component
Local Database Runtime API

Message Text
Error occurred during Local Database instance startup: SQL Server process failed to start.

Explanation A SQL Server process is started but SQL Server startup failed.

User Action See the event log for details.

Source: http://msdn.microsoft.com/en-us/library/hh256140.aspx

0
votes

What worked for me was the local IIS application pool I was using was the ApplicationPoolIdentity and that did not have permission to login to MSSQLLocalDB. As soon as a I changed the app pool identity to my windows login account - I was able to connect ok.

0
votes

Had this issue on Windows 10 when our application was run with compatibility for Windows 8 enabled. Turning off the compatibility setting fixed it.

0
votes

Before you try something drastic:

After waiting for about 5 minutes it "healed" itself.

(May be this is what this log message is pointing at: "The RANU instance is terminating in response to its internal time out")