Save Trace Results to a File
Applies To: SQL Server 2016
You can save trace results to a file. A trace file is a file where the trace results are written. A trace file can be located either in a local directory (such as C:\foldername\filename.trc) or a network directory (such as \\computername\sharename\filename.trc).
You can use the trace files to do the following:
Audit SQL Server
Conduct performance analysis
Correlate trace events with performance counters to enhance problem detection
Perform Database Engine Tuning Advisor analysis
Carry out query optimization
SQL Server saves trace results to a file when a path and file name are specified for the @tracefile argument of the stored procedure sp_trace_create.
If SQL Server Profiler is used, it allows you to save trace results to a file or to a table. Saving trace results to a table allows the same access as saving the trace to a file plus you can query the table to search for specific events.
For more information about saving trace results, see Save Trace Results to a Table (SQL Server Profiler) and Save Trace Results to a File (SQL Server Profiler).