SQL Express - "Failed generate a user instance..."

by JoeStagner 3/12/2008 10:29:46 AM

I Love SQL Server Express. I write demos. Lots of them. SQL Express is great because it's free and works with .MDF files so that I can just bundle up the database with my demo and folks can download a demo, run, and experiment.

I'm "learning" to love Windows Vista.

My only real complaint is that we OVER DID security. I want a switch that says.....

  1. Use Vista's Maximum Security (I never would.)
  2. Lighten Up a Bit (You know, turn of UAC and such.)
  3. Make security on this vista box just like Windows XP
  4. Make me a GOD on this box (Super Grand Admin - I accept the responsibility.)
  5. Windows 98 Mode (TURN IT ALL OFF.)

Life's been very busy these days and I'm working on some new illustrative demos for my AJAX World Talks next week.

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.

Currently rated 2.0 by 3 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Joe Stagner [Syndicated]

Related posts

Comments

3/12/2008 11:18:58 AM

You're "Preaching to the Choir". I also love Vista... because I turn off UAC and anything else annoying.

Michael Washington

3/12/2008 11:25:44 AM

How about some explaination of what you are deleting?

Andrew

3/12/2008 12:23:01 PM

I'd explain if I knew Smile

JoeStagner

3/12/2008 7:26:14 PM

Thanks Joe for the solution.

But what we have to delete .... all files or the whole folder....??

can you explain why we have to delete that.... the reason.!!

krunal

3/13/2008 2:12:19 AM

Delete the whole folder.

JoeStagner

3/13/2008 6:30:31 AM

What?? Did you *just now* switch to Vista? C'mon, fess up... Smile

It's good to see Microsoft employees acknowleging issues that have been around and frequently reported on for the last year and a half.
(see: blog.krisvandermast.com/...ectionWillBeClosed.aspx)

Maybe someone in the Vista group will finally start paying attention. A developer's edition of Vista would have been nice. I has cost me countless hours getting around Vista's security to do the simplest things.

jstengel

3/19/2008 8:14:22 AM

I am getting Failed to generate a User instance of SQL Server I am running Windows Server 2003 with IIS and Visual Web developer 2003.

When ever i go to ASP.Net Configuration and go to Security TAB it Says Data base cannot be contacted.
When i go to Data Base Explorer I can see my data base. I am not able to make use of User and Roles feature provided. Need Help FAST...PLEASE

Vijay Kumar

3/19/2008 7:20:03 PM

Hi Joe,
Now i am getting this one....

"Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. "

How to solve this.? help plz.

krunal

3/20/2008 3:07:00 AM

Web Search is your friend: forums.microsoft.com/.../ShowPost.aspx

JoeStagner

5/20/2008 3:44:26 PM

You're a champ! That error has plagued me for days trying to get Studio Express 2008 running!

Thanks.

Ivan au

6/5/2008 4:16:00 PM

Do I need to be logged in as an administrator to delete this file? I cannot find this folder while logged in as a user. (I'm getting the error message, btw.)

blah us

6/5/2008 7:49:42 PM

What's the error message ?

JoeStagner us

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About your host.

Name of author Joe Stagner
?????

E-mail me Send mail

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in