It’s me

June 25, 2009

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.

Filed under: SQL SERVER — Tags: , — rothmans @ 3:16 pm

Visual Studio 2008과 Visual Studio 2008 Express Edition을 사용하고, ASP.NET의 App_Data 에 MDF 파일을 사용하려고 할때 다음과 같은 에러 메시지가 발생하는 경우가 있습니다

“사용자 인스턴스의 프로세스를 시작하지 못했기 때문에 SQL Server의 사용자 인스턴스를 생성하지 못했습니다. 연결이 닫힙니다.”

“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.”

web.config 내용

<add name=”ConnectionString” connectionString=”Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MyDB.mdf;Integrated Security=True;User Instance=True” providerName=”System.Data.SqlClient”/>
 

해결방법
다음 폴더를 삭제합니다. 삭제 후 재시도 하면 폴더가 재생성되고 MDF 파일 및 로그등이 생성됩니다

C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.