System.Data.SqlClient.SqlException:在无法生成SQL Server的用户实例由于启动该进程为用户实例失败。该连接将被关闭实例、用户、将被、进程

2023-09-02 21:12:35 作者:兜兜转转我回到你身边

任何人曾经得到这个错误和/或有什么想法就可以了的原因和/或解决方案?

Anybody ever get this error and/or have any idea on it's cause and/or solution?

我代表一个朋友问这个,但有在的 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125227&SiteID=1

I'm asking this on behalf of a friend but there is info at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125227&SiteID=1

更新

连接字符串是= SQLEX $ P $干燥综合征; AttachDbFilename = C: TEMP HelloWorldTest.mdf;集成安全性=真

The connection string is "=.SQLEXPRESS;AttachDbFilename=C:tempHelloWorldTest.mdf;Integrated Security=True"

我提出的用户实例=假。这为他工作。

I suggested the "User Instance=false". That works for him.

推荐答案

下面是回答你的问题:

很多时候,老用户的实例创建一些prevent一个新的SQL防爆preSS用户实例被创建的临时文件。当这些文件被删除一切开始正常工作。

Very often old user instance creates some temp files that prevent a new SQL Express user instance to be created. When those files are deleted everything start working properly.

首先确认用户实例运行在SQL Server Management Studio中的下列SQL启用:

First of all confirm that user instances are enabled by running the following SQL in SQL Server Management Studio:

exec sp_configure 'user instances enabled', 1.
GO
Reconfigure

运行查询,重新启动您的SQL Server实例之后。现在,删除以下文件夹:

After running the query restart your SQL Server instance. Now delete the following folder:

C: Documents和Settings {YOUR_USERNAME} 本地设置应用数据微软 Microsoft SQL Server数据 {SQL_INSTANCE_NAME}

请确保您替换 {YOUR_USERNAME} {SQL_INSTANCE_NAME} 用合适的名字。

Make sure that you replace {YOUR_USERNAME} and {SQL_INSTANCE_NAME} with the appropriate names.

来源:Fix错误由于启动进程的用户实例失败导致无法生成SQL Server的用户实例。

 
精彩推荐
图片推荐