简体   繁体   English

SQL Server 2005数据库陷入单用户模式

[英]SQL Server 2005 database stuck in single user mode

I have a database that is stuck in single-user mode. 我有一个陷入单用户模式的数据库。 I kill the process that obtains the "lock" on the db but when I kill it another one spawns automatically, (using the sa account). 我终止了在db上获得“锁定”的进程,但当我杀死它时,另一个自动生成,(使用sa帐户)。 This happens even with SQL Server agent disabled. 即使禁用SQL Server代理,也会发生这种情况。 Any ideas? 有任何想法吗?

Can you login into the server/database? 你可以登录服务器/数据库吗?

If not, try the ADMIN:ServerName and it should open an emergency admin session 如果没有,请尝试ADMIN:ServerName,它应该打开紧急管理会话

Then you can go into the SQL Server to ALTER DATABASE [name] SET MULTI_USER 然后你可以进入SQL Server到ALTER DATABASE [name] SET MULTI_USER

It's probably your SQL Management Studio (or similar) connection. 它可能是您的SQL Management Studio(或类似)连接。 Your killing your own connection, then re-connecting to see if anyone else is on it, resulting in another connection. 你杀了你自己的连接,然后重新连接,看看是否还有其他人,导致另一个连接。

If that is not it, check out the properties (username, status, Application) of the connection in the "Activity Monitor" (under the "Management" folder). 如果不是这样,请在“活动监视器”(“管理”文件夹下)中查看连接的属性(用户名,状态,应用程序)。

If you want to move it out of single user mode, right click on the database and go to the properties. 如果要将其移出单用户模式,请右键单击数据库并转到属性。 Select the "Options", and right down the bottom is a property called "Restrict Access". 选择“选项”,在底部右下角是一个名为“限制访问”的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM