I know this is a very old post, but I've been battling for the past hour with this, and finally resolved it with a hot reboot! sounds to simple to be true, but it worked.
This problem took down one of our high-availability-required and in-use production systems for over 24 hours. Code that we wrote in VS C# with an SQL Express back-end suddenly crashed without warning after running 24 x 7 for months. The steps that we had
to take, based on the troubleshooting ideas in this thread were (the system in question is running Win XP Pro SP3):
1. Removed SQLEXPRESS folders. (Our application still crashes on start-up with the noted error.)
2. Changed all SQL-related services to run under the LOCAL SYSTEM account and rebooted. (Did not help.)
3. In the C# Visual Studio 2008 IDE attempted to access the databases behind the project using the Database Explorer view -- they do not open. (Same error.)
4. Changed the database connection details using the "Advanced" option and set to User Instance = FALSE. (Did not help.)
5. Ran a System Restore to a few weeks back when the application was working fine. (Did not help.)
6. Uninstalled all SQL components listed in Control Panel | Add & Remove Programs. Then ran a repair installation of C# VS2008. (Did not help.)
7. Ran a component reinstall of SQL using the C# VS2008 to reinstall the SQL Express back-end and then made sure the User Instance was set to FALSE in the Database Explorer Data Connection in Visual Studio. After this step the back-end could be opened in
the Database Explorer, but the application still crashes with the "Failed to generate a user instance..." error after recompiling and running and when running in debug mode in the IDE.
8. In the C# project properties pages, under Settings, set the connection string associated with the project to include "User Instance=False" at the end of the string and then recompiled the project.
After step 8, the compiled application can run again and open its database and can also be executed in debug mode in the IDE.
First of all, I want to thank those who went before and figured-out some of these issues and posted -- without this material our system would be completely DOA right now still. Secondly, I want to express my dismay at the *APPARENTLY RANDOM INSTABILITY*
this introduces into production software that has taken considerable time and effort to develop.
Wow.
All I can say is that it would be nice if MS stood up to the plate and offered an explanation for this issue and a real solution to go with it.
ShadyGeorge
Member
2 Points
1 Post
Re: Failed to generate a user instance of SQL Server
Aug 11, 2011 06:24 PM|LINK
I know this is a very old post, but I've been battling for the past hour with this, and finally resolved it with a hot reboot! sounds to simple to be true, but it worked.
Shady.
JeremiahHors...
Member
2 Points
1 Post
Re: Failed to generate a user instance of SQL Server
Oct 03, 2011 07:37 PM|LINK
Thanks!
That did the trick!
How did deleting the directory fix the problem?
-Jeremiah
tbuitendyk
Member
2 Points
1 Post
Re: Failed to generate a user instance of SQL Server
Oct 07, 2011 06:32 AM|LINK
This problem took down one of our high-availability-required and in-use production systems for over 24 hours. Code that we wrote in VS C# with an SQL Express back-end suddenly crashed without warning after running 24 x 7 for months. The steps that we had to take, based on the troubleshooting ideas in this thread were (the system in question is running Win XP Pro SP3):
1. Removed SQLEXPRESS folders. (Our application still crashes on start-up with the noted error.)
2. Changed all SQL-related services to run under the LOCAL SYSTEM account and rebooted. (Did not help.)
3. In the C# Visual Studio 2008 IDE attempted to access the databases behind the project using the Database Explorer view -- they do not open. (Same error.)
4. Changed the database connection details using the "Advanced" option and set to User Instance = FALSE. (Did not help.)
5. Ran a System Restore to a few weeks back when the application was working fine. (Did not help.)
6. Uninstalled all SQL components listed in Control Panel | Add & Remove Programs. Then ran a repair installation of C# VS2008. (Did not help.)
7. Ran a component reinstall of SQL using the C# VS2008 to reinstall the SQL Express back-end and then made sure the User Instance was set to FALSE in the Database Explorer Data Connection in Visual Studio. After this step the back-end could be opened in the Database Explorer, but the application still crashes with the "Failed to generate a user instance..." error after recompiling and running and when running in debug mode in the IDE.
8. In the C# project properties pages, under Settings, set the connection string associated with the project to include "User Instance=False" at the end of the string and then recompiled the project.
After step 8, the compiled application can run again and open its database and can also be executed in debug mode in the IDE.
First of all, I want to thank those who went before and figured-out some of these issues and posted -- without this material our system would be completely DOA right now still. Secondly, I want to express my dismay at the *APPARENTLY RANDOM INSTABILITY* this introduces into production software that has taken considerable time and effort to develop.
Wow.
All I can say is that it would be nice if MS stood up to the plate and offered an explanation for this issue and a real solution to go with it.
t.