USE master; GO DECLARE @SQL VARCHAR(MAX); SET @SQL=‘‘ SELECT @SQL[email protected]+‘; KILL ‘+RTRIM(SPID) FROM master..sysprocesses WHERE dbid=DB_ID(‘数据库名‘); EXEC(@SQL); ALTER DATABASE 数据库名 SET MULTI_USER;
原文地址:https://www.cnblogs.com/zacklau/p/9780108.html
时间: 2024-10-05 04:32:38