Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 2.38 KB

save-trace-results-to-a-file-sql-server-profiler.md

File metadata and controls

53 lines (33 loc) · 2.38 KB
title titleSuffix description author ms.author ms.date ms.service ms.subservice ms.topic
Save Trace Results to a File
SQL Server Profiler
Find out how to save captured event data to a trace file, specify a maximum trace file size, and enable the file rollover option in SQL Server Profiler.
markingmyname
maghan
03/14/2017
sql
profiler
conceptual

Save Trace Results to a File (SQL Server Profiler)

[!INCLUDE SQL Server Azure SQL Managed Instance]

This topic describes how to save trace results to a file by using [!INCLUDEssSqlProfiler].

To save trace results to a file

  1. On the File menu, click New Trace, and then connect to an instance of [!INCLUDEssNoVersion].

    The Trace Propertiesdialog box appears.

    [!NOTE]
    If Start tracing immediately after making connectionis selected, the Trace Propertiesdialog box fails to appear and the trace begins instead. To turn off this setting, on the Toolsmenu, click Options, and clear the Start tracing immediately after making connection check box.

  2. In the Trace name box, type a name for the trace.

  3. Select the Save to file check box.

    The Save Asdialog box appears.

  4. Specify a path and filename in the Save Asdialog box. Click Save.

    [!NOTE]
    Ensure that the SQL Server service has sufficient permissions to write to a file in the directory specified.

  5. In the Trace Properties dialog box, enter the maximum file size in the Set maximum file size (MB) text box. The default value is 5 megabytes (MB).

  6. Optionally, specify the following options:

    • Select the Enable file rollover check box to have [!INCLUDEssSqlProfiler] create new files for trace data once the maximum file size is reached. This option is selected by default.

    • Select the Server processes trace data check box to ensure that the server records each trace event.

      [!NOTE]
      When Server processes trace datais cleared, the server does not record events if recording events significantly degrades performance.

See Also

SQL Server Profiler