摘要:
declare @spid int ;declare @ddlstring nvarchar(max);declare @dbname varchar(200);set @dbname='BIDB';declare tmpcur cursorfor select distinct spid as spid from sys.sysprocesseswhere dbid=db_id(@dbname) ;OPEN tmpcur;fetch tmpcur into @spid ;while (@@FETCH_STATUS=0)beginset @ddlstring=N'Kil 阅读全文