输入banner图图片脚本导航/分类

清除数据库的关联

@spid int ; declare @ddlstring nvarchar(max); declare @dbname varchar(200); set @dbname=dbName; declare tmpcur cursor for select distinct spid as spid from sys.sysprocesses where dbid=db_id(@dbname) ; OPEN tmpcur; fetch tmpcur into @spid ; while (@@FETCH_STATUS=0) begin print @spid if(@@spid!=@spid)--过滤自己的进程 begin set @ddlstring=NKill +CONVERT( nvarchar,@spid) ; execute sp_executesql @ddlstring ; end fetch tmpcur into @spid ; end ; close tmpcur ; deallocate tmpcur ;

 

清除数据库的关联

标签: