40

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 .

sqllocaldb info 

gives me :

Projects v11.0

when i try

sqllocaldb start v11.0

I get the above error.

5
  • @Alex answer provides link to informative article that has solution for problem with IIS and LocalDb: stackoverflow.com/a/27257343/237858
    – nikib3ro
    Commented Apr 16, 2015 at 0:24
  • 1
    @kape123 i did manage to fix the problem.. Removing IIS and MSSQL.. Life has been wonderful since! ^_^
    – Pogrindis
    Commented Apr 16, 2015 at 9:04
  • Was sqllocaldb named sqllocal at some earlier point? Or is that a misnomer in OP? Or are sqllocal and sqllocaldb two different tools? Commented Oct 8, 2019 at 23:44
  • 1
    @TrevorReid It was quite a while ago, but i suspect I was referencing the pipe, the cli should be, today anyway sqllocaldb
    – Pogrindis
    Commented Oct 9, 2019 at 0:00
  • 1
    For windows 11 one might want to check stackoverflow.com/questions/73148657/sqllocaldb-doesnt-start/…
    – Timofeus
    Commented Jan 9, 2023 at 15:47

12 Answers 12

63

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

6
  • 1
    Warning: something else was wrong with my localDB after I did this, I don't know what, but I ended up redownloading LocalDB installer, uninstalling LocalDB, and reinstalling from the download. Commented Jan 13, 2014 at 23:36
  • 2
    Actually this didn't help me either, something else is screwed up with my local db now :( Commented Jan 13, 2014 at 23:47
  • 1
    I eventually got it working. And yes these steps were part of the solution. But I had other problems as well. :-/ Commented Mar 18, 2014 at 15:45
  • 2
    @JDPeckham I assume that v12.0 means you're on a newer version of SQL Server.. Microsoft SQL Server 2014? Commented Apr 12, 2017 at 21:36
  • 2
    sqllocaldb delete "MSSQLLocalDB" then sqllocaldb create "MSSQLLocalDB" for updated versions
    – Kerberos
    Commented May 21, 2018 at 11:23
32

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

2
  • 6
    This is what solved the problem for me... as linked article says: you need to open C:\Windows\System32\inetsrv\config\applicationHost.config in Notepad and add setProfileEnvironment="true" to your AppPool.
    – nikib3ro
    Commented Apr 16, 2015 at 0:22
  • It worked for me, starting the local db without telling the instance name. I used to call "sqllocaldb start mssqllocaldb" instead of "sqllocaldb start". I have a single instance though :) Commented Aug 21, 2018 at 7:56
9

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.

8

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
  • I haven't dug deep enough to see which user actually needs the permissions... after adding "Everyone" with Full Control in the list I was able to verify that it worked. On a hunch I removed "Everyone" and it still worked... but it looks like it flipped the other accounts already in the list to Full Control as well... which is probably why it still works for me.
    – azarc3
    Commented Oct 9, 2017 at 15:47
6

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

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
1

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.

0

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

8
  • 1
    I saw that and found it utterly useless. even log only show a fail message. Im looking for a reason as to why this service cannot start. Not a link to the first google search result thanks.
    – Pogrindis
    Commented Nov 8, 2012 at 16:43
  • Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. [CLIENT: <local machine>]
    – Pogrindis
    Commented Nov 8, 2012 at 16:45
  • No need to get angry at me for asking what is described as the MS solution. If you did already do that, it would have helped adding the error message from the Event Log to the OP. Did you try deleting the old installation data from: C:\Documents and Settings\YOUR_USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS?
    – SchmitzIT
    Commented Nov 8, 2012 at 16:53
  • :) Sorry, MS annoys me sometimes! Yes, i removed all of the app data after uninstallation, then installed again, even tried to open visual studio and debug an MVC3 project using LocalDB in the connection string to try and force it.. No joy.. Im baffled. Might format PC! ;/
    – Pogrindis
    Commented Nov 9, 2012 at 9:57
  • 3
    Third thing I tried was to delete everything in that Instances\v11.0 folder, go to appwiz.cpl and do 'repair' of 'Microsoft SQL Server Express LocalDB'. Then "sqllocaldb delete v11.0"; "sqllocaldb create v11.0". Seems to have worked for me. Hope this helps someone. :) Commented Dec 11, 2013 at 20:23
0

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

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

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

0

I can not yet comment posts here but I really want to give a hint for the in my case extremely helpful post https://stackoverflow.com/a/30298863/8015089 above:

If your LocalDB instance is run by the Windows SYSTEM user (as in my case) the path to error.log is this (MS SQL Server 2012 Express LocalDB on Win11): C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\<InstanceName> (enter this path subfolder by subfolder to avoid access problems!)

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