Extracting Data from a SQL Profiler trace file.

There is no easy way to get the results from a SQL profiler trace into excel directly. So I have used the fn_trace_gettable function to list long running SQL/Strored Procedures in the SQL editor.. See example below:

SELECT TextData,(Duration/1000), CPU, RowCounts FROM ::fn_trace_gettable('C:\Admit.trc', default) order by Duration desc

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s