Failed to generate a user instance of sql server - by wgt2

Status : 

  Postponed<br /><br />
		Due to current priorities, the product team decided to postpone the resolution of this item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


4
0
Sign in
to vote
ID 510594 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 11/14/2009 12:56:26 PM
Access Restriction Public

Description

"Failed to generate a user instance of sql server due to a failure in starting the process for the user instance" - HResult 0x80040201 -generated from Solution Explorer add new Sql Server item - was working in SS 2005 before upgrade to 2008 SP1

Environment, Vista SP2 Ultimate 64-bit, VS10 Beta 2, SS 2008 SP1
Sign in to post a comment.
Posted by mikrodotnet on 11/18/2013 at 1:27 AM
installed SQL Server 2008 R2 which caused this error i've spent a couple hours uninstalling/re-installing etc. nothing fixed the problem, deleting the folder fixed everything. thanks!
Posted by genh on 9/15/2012 at 9:36 AM
Encountered this bug after installing windows updates on 9-14-12 (kb890830,2736233,2735855,2741355,2719857,2645410,2635973,2549864 and 2548139) Windows 7, 64 bit, sql server 2012 express. Fix worked after i spent a day trying various other fixes. Thanks wgt2
Posted by hwmjr on 8/29/2012 at 12:28 PM
Thanks wgt2 - This also works on Windows 7 machines, just have to find that "\Microsoft SQL Server Data\SQLEXPRESS" directory. No problem if you know the directory structure.
Posted by William Bosacker on 11/9/2011 at 9:22 PM
This problem still exists in SQL Server 2008 R2 Express version 10.51.2500.0
Posted by Microsoft on 12/16/2009 at 10:00 AM
Hi,

This bug will be fixed in the future release of SQL Server Express. Unfortunately there’s nothing we can do to address it in Visual Studio 2010, as we distribute the latest available SQL Server 2008 Express SP1.

Thanks,
Krzysztof Kozielczyk (Microsoft)

Posted by Microsoft on 11/19/2009 at 4:31 PM
Hello,

Thank you again for reporting this issue.

From your comments I assume you have found a fix to the immediate problem – please let us know if that’s not the case, we will investigate further.

A general comment – SQL Server User Instance feature wasn’t really designed to work with IIS security model. Probably the best way to avoid issues like this one is to go to your config file and make sure to remove the “user instance=true” from there. We are looking at improving the cooperation between SQL Server Express and IIS in the future releases of Visual Studio and SQL Server. If you have any suggestions I’d be very glad to know them.

Thanks,
Krzysztof Kozielczyk (Microsoft)

Posted by wgt2 on 11/16/2009 at 6:05 AM
Some background on this - I installed the same vs environment on two identically configured machines (different hardware) - one worked fine - the other had this problem. I note that it keeps coming up, through the various versiions and upgrades since ss 2005 and 2008 and vs2005 to 2008 to 2010. Seems by now this installation bug should have been fixed or at least commented on in the release notes as a known problem...
Posted by wgt2 on 11/16/2009 at 5:59 AM
Thanks. After further research, here's the most straight-forward and effective fix for this - posted from Joe Stegner in March of last year.

"Trying to connect to my SQL Express database from my ASP.NET code yields the following message.

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

... "a failure."

CAN YOU BE A BIT MORE SPECIFIC ????????

I know, I know, this is a typical Microsoft error message.

I know SQL Express installers locked down to some extend so I thought maybe the issue was disabled protocols as I was carrying forward some code, but alas - nothing seamed to help. I tried all the configuration tools, used the surface area tool and added everyone to the SQL admin's groups. NOTHING

After searching and playing for some time I got things working again and wanted to share the solution.

If you're running from the IDE then you are running as yourself so:

Delete C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS.

If you're running via IIS the user is usually ASPNET so....

Delete C:\Documents and Settings\COMPUTERNAME\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

Hope you found this and it saves you some time."

Published Wednesday, March 12, 2008 4:30 PM by JoeStagner
Posted by Microsoft on 11/16/2009 at 2:24 AM
Thanks for your feedback.

We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.