【摘要】Failed to generate a user instance of SQL Server due to ...

Error: SQL Express 2008 ERROR: Failed to generate a user instance of SQL Server and
Error: 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."

To correct the problem, I

  1. Shut down SQL Server Express
  2. Deleted the users SQL Express directory "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"
  3. Restarted SQL Server Express:

Here's a cmd script for what is needed:

SC.EXE stop "MSSQL$SQLEXPRESS"
CHOICE /C:N /D:N /N /T:5
RD /S /Q "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"
SC.EXE start "MSSQL$SQLEXPRESS"

posted @ 2010-11-04 14:29  一 缕 阳 光  阅读(385)  评论(0编辑  收藏  举报