11

I'm the administrator and simply run the command:

 sqllocaldb start v11.0

Result:

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

Event viewer log Event ID: 528

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: 3621.

I tried another (user and administrator) accounts, there were no problems with them.

I uninstalled & reinstalled 2012 version of SQLLocalDB.msi but I had no luck. Do you have any idea & fix?

  • Visual Studio had trouble starting my project and I saw the same error in the event log. Fixed it by running sqllocaldb start v11.0. – Andre Luus Apr 9 '13 at 6:51
12

Check the error log which usually under the folder %localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0 will give you big hints.

Log back in as the administrator account (not an administrator), and start a command prompt with Run As Administrator. Then run this:

sqllocaldb share v11.0 MyInstance

You might want to explicitly add your Windows account as a sysadmin on this instance if that is a goal. So:

sqllocaldb start MyInstance

Then connect with SQLCMD, Management Studio, what have you, and run:

CREATE LOGIN [Domain\Username] FROM WINDOWS;
EXEC sp_addsrvrolemember N'Domain\Username', N'sysadmin';

Now log back in as your Windows account, and you should be able to start this instance using:

sqllocaldb start MyInstance

(It may already be started depending on your O/S and how you switched accounts.)

Then Domain\Username should be able to connect using SQLCMD, SSMS etc. using (localdb)\.\MyInstance.

  • 1
    This is a good workaround but it can't explain & solve the problem. – Nime Cloud Dec 17 '12 at 12:50
  • 1
    @NimeCloud um, ok, maybe someone else will come along with a better "fix." <shrug> – Aaron Bertrand Dec 17 '12 at 14:27
  • This worked for me. It was related to the original instance where the specific user has no grants anymore and weirdly it cannot give access to no matter what you do. The shared instance was treated as separate identity thus it was given a "fresh" start where the app can now connect like before. – Jon P Feb 4 at 3:26
7

I logged off and then logged in as another administrator and renamed my user profile folder's name. I switched into my account in Windows 7. There is a newly created TEMP folder as my user profile folder. I compared before & after folder structure as in picture. Plus; LocalDB instance started successfully.

localdb2.png

I logged off and renamed my username to original. Logged again & jumped into that folder:

C:\Users\MYUSERNAME\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0

And saw the error logs; Access denied!

http://pastebin.com/ASeJGqpw

Solution: Simply delete all files in v11.0 folder. Give write permision to v11.0 folder. If you can't create another instance give write permission to Instances folder.

  • 1
    Deleted the v11.0 folder. Then issued sqllocaldb.exe c v11.0 to recreate it (in VS2013 developer command line, elevated). This solved it. – cheesus SO stop harming Monica Apr 21 '15 at 17:16
2

I used to have this problem when my localdb and sql instance was installed with a different user than the current (domain user), so I fixed this by clearing the V11.0 folder and pasting the mdf and ldf files from the old path :

C:\Users\{inseryouroldusernamehere}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0

Hope it helps.

1

I had this once and a simple reboot solved it. Seems to have solved it for other people too. Maybe worth attempting before doing Nime & Aarons answers

1

I opened services.msc and restarted the following services:

  • Sql Server Browser
  • Sql Server VSS Writer

Hope it helps

1

Create a file fix.bat, put the following text in it:

net localgroup Administrators "%userdomain%\%username%" /add

net localgroup Users "%userdomain%\%username%" /add

sqllocaldb d test

rd /s/q "%localappdata%\Microsoft\Microsoft SQL Server LocalDB\Instances\test"

sqllocaldb c test -s

Run fix.bat as the administrator then restart your computer. Run fix.bat again.

I have used this method to solve this problem over 10 times.

0

I am posting this here as this question is currently higher in Google search results than others. In my case LocalDB couldn't be started from IIS. I followed the this SO comment's suggestion to modify C:\Windows\System32\inetsrv\config\applicationHost.config to add setProfileEnvironment="true" to the App Pool as described in Using LocalDB with Full IIS, Part 1: User Profile. I actually changed the applicationPoolDefaults's processModel's setProfileEnvironment attribute to true and it worked as well which might be better so you don't need to remember to do it for every new App Pool.

0

If you don't have any real info in the localdb instance, you can simply delete it. This is a good choice if your database are automatically initialized (using EF DbInitializer or migrations etc.).

Here's what I did to resolve the issue:

  • Open a command prompt window
  • Execute sqllocaldb delete ****, where **** is either blank for the default instance (usually MSSqlLocalDb or the troublesome instance
  • Execute sqllocaldb create ****
  • Execute sqllocaldb start ****

This worked for me, but do this at your own risk and make sure to double check you have no valuable data in that instance, and ensure you perform the actions on the correct instance.

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.