时间:2021-07-01 10:21:17 帮助过:41人阅读
USE master
GO
ALTER DATABASE [DBName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
--查看是否还有用户连接
SELECT * FROM sys.[sysprocesses] WHERE DB_NAME([dbid])=‘DBName‘
GO
ALTER DATABASE [DBName] SET MULTI_USER
GO
SQL Server 断开某个数据库所有连接(还原的时候需要)
标签:属性 rom .sql soft 数据库服务 strong tle body system