Reprint: Experience sharing using SQL Profiler Trace (2005) (new trace, analysis trace file)
The use of SQL Server Profiler can be seen in this article Sql2005 performance tools (SQL Server Profiler and Database Engine Tuning Advisor) using a detailed approach
Yesterday, the SQL execution of a program was followed, and the TRC (trace file for SQL Server Profiler) was opened, and 800 data were recorded in 2 minutes.
The vast majority are not the data I want, this tool also has no filtering function, it is really troublesome to find out what I want from so much data.
Bing took a piece on the stack overflow there's an is there a-way to filter a SQL Profiler trace?
Share the experience of others here.
1. How can I track it more effectively?
Add the "Application Name"/"app" key to the application's connection string, so that when you create a new trace,
can be filtered according to ApplicationName in the "column filter" (e.g.)
2. What if the TRC file is filtered?
As I said at the beginning, I get a 800-line file, and if I filter out what I need from it?
You can perform this section in SQL Server Management Studio
SELECT * INTO TraceTableFROM ::fn_trace_gettable(‘d:\sqlLog.trc‘, default)
(d:\sqlLog.trc:跟踪文件的全路径)
然后数据库里就会多了张TraceTable表,跟踪文件里的内容写到这张表里去了。
(tracetable table)
After that, you'll be able to analyze this tracetable.
Experience sharing with SQL Profiler Trace (2005) (new Trace, parse trace file)