declare @d
varchar(8000)
set @d = ''
select @d = @d + ' kill ' + cast(spid as varchar) + char(13)
from master.. sysprocesses where dbid= db_id( '数据库名')
exec(@d)
set @d = ''
select @d = @d + ' kill ' + cast(spid as varchar) + char(13)
from master.. sysprocesses where dbid= db_id( '数据库名')
exec(@d)