Importing trace files from SQL Profiler

When running a trace using SQL Profiler we need to be Importing trace files to perform some analysis on the results.

To import the files we will simply use the fn_trace_gettable function.

 

SELECT * INTO tracetable FROM dbo.fn_trace_gettable ('C:\tracefiles\trace_1_1.trc', default)

 

This will import one file from the location C:\tracefiles\trace_1_1.trc and import it to a created tracetable table in the selected database.

Please also note that the function is deprecated.

Thanks for reading!

Importing trace files from SQL Profiler

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest