Amr Elgarhy
Amr Elgarhy

Reputation: 68922

SQL Express 2005 problem with VS 2008

I have SQL Server 2005 installed and VS 2008 on Windows XP Pro SP2.

I am building a VB.Net windows application and trying to add a .mdf database to it as a local db inside the project.

But i always receive this message:

"Local database file

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.

OK "

i searched on google for this error, and tried the first 3 links which are mainly talking about this solution:

"delete the C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory.

Then restart ur machine."

But i don't have this directory

Here are some screen shots from my machine:

Image1

Image2

Image3

Image4

Does anyone faced this problem before and how to solve it?

Upvotes: 1

Views: 502

Answers (3)

Amr Elgarhy
Amr Elgarhy

Reputation: 68922

Exactly Solved my problem:

http://jeremywadsworth.com/Default.aspx?blogentryid=64

"Milan said...

just want to comment on: The solution to ur problem goes lik this.

  1. Open SQL Server Configuration Manager. Navigation to Start > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration Manager
  2. Double-click SQL Server (SQLEXPRESS) and change it to use LocalSystem
  3. Delete the folder
    • Windows Vista: C:\Users[user]\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
    • Windows XP: c:\Documents and Settings[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

more info at: http://forums.microsoft.com/msdn/showpost.aspx?postid=98346&siteid=1.

That’s it. Does that fix your problem? it should fix ur problem ... FANTASTIC! Thanks very much, I've spent 4 days trying to solve this, this is the first site where I've found a solution to this problem. Thanks again!"

Upvotes: 2

Steve Temple
Steve Temple

Reputation: 2278

Is there a logfile in the C:\Documents and Settings\\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory or does it not exist at all?

I'd say it's most likely a permissions issue have you checked that the user the SQL server is running as has access to the folder above or its parent folders or the data folder which would be under c:\program files\Microsoft SQL server or similar

Upvotes: 1

Roger Willcocks
Roger Willcocks

Reputation: 1669

If you have SQL Server 2005 rather than SQL EXPRESS, User instances are not supported

Upvotes: 0

Related Questions