当前位置:首页 >数据库 >使用SQL Trace来实现SQL Server的跟踪操作 正文

使用SQL Trace来实现SQL Server的跟踪操作

来源:益强资讯优选   作者:人工智能   时间:2025-11-05 13:57:59
使用SQL Trace来实现SQL Server的跟踪操作
复制create  proc [dbo].[Performance_Trace_StopAll]   AS   declare traceCursor cursor for select id from sys.traces where id <> 1   open traceCursor   declare @curid int   fetch next from traceCursor into @curid   while(@@fetch_status=0)   begin            exec  sp_trace_setstatus @curid,使用实现0   exec  sp_trace_setstatus @curid,2   fetch next from 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.

标签:

责任编辑:应用开发