Monday, September 23, 2013

How to query SQL Profiler's trace file?

1. Read from the trace file into temp table in DB
2. Query table

SELECT * INTO MyTraceTemp

FROM ::fn_trace_gettable('c:\x\MyTrace.trc', default)

SELECT Reads, Duration, * FROM MyTraceTemp ORDER BY Reads DESC

No comments:

Post a Comment