Error: Failed to generate a user instance of SQL Server...

roger's picture

I was just hacking something together in Visual Web Developer Express, and was attempting to add a database to my App_Data directory when I ran into problems.

VWD kept timing out, and giving me a variety of error messages. Event Viewer contained the following: 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: ]

I did some googling, and discovered the solution: you need to delete the C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory.

What everyone else failed to emphasise is that you might need to restart Windows. Simply bouncing the SQL Server Express service doesn't always fix it.

This is what I did:

  • Reboot the computer.
  • Log in as Administrator (I run with non-Admin privileges most of the time).
  • Delete the SQLEXPRESS directory for my normal user account.
  • Log back in as my normal user.

You can see if it's working properly by using the SSEUTIL utility. "sseutil -l" (that's a lower-case L) should list the databases currently being used by your user account.

Comments

thank you

This was the only solution that worked for me :) Muchas Gracias!!!

Worked for me :)

Worked for me. Thanks very much.

Happened to me on VS2008/Vista

Thanks for posting this up, i'm interested to how/why this fixes it... and why on earth it's still happening in VS2008 sqlexpress

Thanks

Thanks for posting this - it solved my problem painlessly :)

Thank you very much, it

Thank you very much, it worked for me too. Using Window Vista Home Edition...

might be silly

This might be a silly question but I cant find that folder in Windows XP.. I don't have a 'Local Settings' folder... can anyone help me out here?

Local Settings

Local Settings is a hidden folder.

the folder in vista is

the folder in vista is something like: C:\Users\\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS i too had the same problem and once i deleted the folder in this directory i had success. J

Thanks

Thanks its work for me :)

Thank you. You have saved

Thank you. You have saved another life :-)

thanks bro..

thanks bro..

Thanks

Thanks for this, it solved my problem!

RE: failed to generate user instance of SQL Server

I have searched endlessly till your post for the answer to this week long struggle. Just had to say that I can go on to video tutorial 3 now. Thank you soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo much! Eyveneen

CANNOT OPEN DATABASE THROUGH APP_DATA

did not work for me :|

Thank you, This worked for

Thank you, This worked for my pc too.

THANKSS

Dude u r a genius! When forums at Microsoft and asp.net websites brimming with SQL professionals from microsoft can only blabber about the problem with no intention of giving us the solution but only striving to make us more confused (and achieving it!) by uttering mumbo-jumbo technical terms to show off their apparent "depth of knowledge", ur solution was to the point and gave me the solution to what can only be described as a typically microsoft, you-paid-for-the-product-accept-the-bug-we-give-a-damn-to-customer-support defect.... thanks again!

Wow dude you really save

Wow dude you really save lives, especially important ones like mine ^^

It worked!!!!

Thank you very much! It worked also for me! Thank you!

very nice

Thanks so much!

you are the man!

you are the man!

Thank you very much. It

Thank you very much. It worked on vista.

You are the best

Simply had to delete the folder (under networkservice) and CTRL-F5 in the browser and Bingo! No reboot needed.

Cool dudee... worked like

Cool dudee... worked like magic... saved couple of hours for me..

very good.

very good.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.