 复制/*+--------------------------------------------------------------------------------------------------------------------------------------- * 名称: [DBO].[Performance_Trace_StopAll] * 功能: 防止反跟踪 * 作者: junling * 创建时间: 2011-02-09 * 项目名称: XXXX * ----------------------------------------------------------------------------------------------------------------------------------------- * 历史记录 * 编号 日期 作者 备注 * 1.0 2011-02-09 junling 创建 ------------------------------------------------------------------------------------------------------------------------------------------+*/ create proc [dbo].[Performance_Trace_StopAll] AS declare traceCursor cursorforselect id from sys.traces where id <> 1 open traceCursor declare @curid int fetchnextfrom traceCursor into @curid while(@@fetch_status=0) begin exec sp_trace_setstatus @curid,擦亮0 exec sp_trace_setstatus @curid,2 fetchnextfrom traceCursor into @curid end close traceCursor deallocate traceCursor 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27. |