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