加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

sql-server-2005 – SQL2005陷入单模用户

发布时间:2020-12-12 16:49:41 所属栏目:MsSql教程 来源:网络整理
导读:嘿,目前有一个数据库在设置为单一模式后陷入单一模式,试图尝试离线,我希望我从未做过…. 我试过了 ALTER DATABASE DB SET MULTI_USER 但得到 Msg 5064,Level 16,State 1,Line 1 Changes to the state or options of database ‘DB’ cannot be made at this t
嘿,目前有一个数据库在设置为单一模式后陷入单一模式,试图尝试离线,我希望我从未做过….

我试过了

ALTER DATABASE DB SET MULTI_USER

但得到

Msg 5064,Level 16,State 1,Line 1
Changes to the state or options of
database ‘DB’ cannot be made at this
time. The database is in single-user
mode,and a user is currently
connected to it. Msg 5069,
State 1,Line 1 ALTER DATABASE
statement failed.

当我右键单击数据库以转到我获得的属性时

数据库“DB”已经打开,一次只能有一个用户.

有任何想法吗 ?

解决方法

SELECT * from sys.databases – >从数据库中获取database_id.

SELECT * FROM MASTER..SysProcesses WHERE dbid = [thedbid](插入你的db id)

查看spid来杀死

KILL [theid]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读