USE master;
GO
DECLARE @SQL VARCHAR(MAX);
SET @SQL=‘‘
SELECT @[email protected]+‘; KILL ‘+RTRIM(SPID)
FROM master..sysprocesses
WHERE dbid=DB_ID(‘ty_active_log_gz‘);
EXEC(@SQL);
GO
ALTER DATABASE ty_active_log_gz SET MULTI_USER;
时间: 2024-10-15 03:51:33