USE master;GODECLARE @SQL VARCHAR(MAX);SET @SQL=''SELECT @SQL=@SQL+'; KILL '+RTRIM(SPID)FROM master..sysprocessesWHERE dbid=DB_ID('cmistest');
EXEC(@SQL);
GO
ALTER DATABASE cmistest SET multi_user