Showing posts with label WINDOWS 7. Show all posts
Showing posts with label WINDOWS 7. Show all posts

Thursday, May 30, 2013

ERROR :- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance.

Sql Server 2008 Express Run Under Windows 7.

Connection String:- Data Source=.\SQLEXPRESS; AttachDbFilename= '|DataDirectory|\Database1.mdf'; Integrated Security=True;User Instance=True;Connect Timeout =60


Connection failed with Following Error Message.
"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance."

Solution
 
1. Stop all user instance processes of SQL Server running under your local account (open up task manager and look for sqlsrv.exe process and end it)

2. Delete all files in the %LOCALAPPDATA%\Microsoft\Microsoft SQL Server Data\SQLEXPRESS folder
(In Windows XP 'C:\Documents and Settings\<<<currentuser>>>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS)'

3. Restart sql server instance

The problem is known issue.
SQL Express cannot create a user instance using the set of engine files in your local app data folder, deleting them should allow sql server to recreate them with the correct credentials.