T-SQL生成SQL追踪信息 2015/04/30 13535 declare @maxfilesize bigint; declare @filecnt int; set @trid = 0; set @maxfilesize = 10; set @filecnt = 10; exec sp_trace_create @trid OUTPUT, 2, N'd:\sqltrace\mytrace', @maxfilesize, NULL, @filecnt; select @trid; go