将数据库从 SINGLE USER 模式设置为 MULTI USER [英] Set database from SINGLE USER mode to MULTI USER
问题描述
我需要帮助将在 SINGLE_USER
模式下恢复的数据库设置为 MULTI_USER
.每次我跑
I need help with setting a database that was restored in SINGLE_USER
mode to MULTI_USER
. Every time I run
ALTER DATABASE BARDABARD
SET MULTI_USER;
GO
我收到此错误:
此时无法更改数据库BARDABARD"的状态或选项.
Changes to the state or options of database 'BARDABARD' cannot be made at this time.
数据库处于单用户模式,当前有用户连接.
The database is in single-user mode, and a user is currently connected to it.
它需要处于非SINGLE_USER
模式才能将其设置为另一种模式,但是当它处于SINGLE_USER
模式时,我无法将数据库设置为任何其他模式.
It needs to be in non-SINGLE_USER
mode to set it to another mode, but I can’t set the database in any another mode while it is SINGLE_USER
mode.
推荐答案
用户当前已连接到它"可能是 SQL Server Management Studio 窗口本身.尝试选择主数据库并再次运行 ALTER
查询.
The "user is currently connected to it" might be SQL Server Management Studio window itself. Try selecting the master database and running the ALTER
query again.
这篇关于将数据库从 SINGLE USER 模式设置为 MULTI USER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!