Saving Profiler Trace Results To A Table

Often while using profiler trace to capture the events and statements, you may need to save them somewhere to do further analyzes later. There are several ways to save the trace results. You can save is as a file with .trc extension, a table in database, as XML file,… etc. The way I prefer for saving profiler trace results is to store them to a table in SQL Server database. Then, you can use it for further analysis when needed. As the trace result is stored in a table, you can easily filter the events using simple select statement using SSMS. If needed you can even open the table back in profiler as a trace window.

Steps For Saving Profiler Trace Results To Table

  1. After capturing the events in profiler, stop the trace.
  2. Go to File >> Save Us >> Trace Table…
    Saving Profiler Trace Results To A Table
  3. In the connection screen, enter the SQL Server credentials and press Connect.
  4. Now, In the destination table screen, Select the Database, Schema and enter a table name in the Table field. Then press OK.
    Saving Profiler Trace Results To A Table
  5. The trace result is now stored in the database table. To check it, launch SSMS and look for the table and its contents.
    Saving Profiler Trace Results To A Table

Opening The Saved Trace Results Table Back In Profiler

  1. To open the trace results saved in a table from the profiler, go to File >> Open >> Trace Table….
    Opening Profiler Trace Results from Table
  2. Now, In the connection screen, enter the SQL Server credentials and press Connect.
  3. In the destination table screen, Select the Database, Schema and Table in which the trace results are stored. Then press OK.
  4. The results will now open in the profiler trace window.
    Opening Profiler Trace Results from Table to trace window

Related Articles


Leave your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.