Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Managed Instance
This topic describes how to use SQL Server Profiler to create a trace.
On the File menu, click New Trace, and connect to an instance of SQL Server.
The Trace Properties dialog box appears.
Note
The Trace Properties dialog box fails to appear, and the trace begins instead, if Start tracing immediately after making connection is selected. To turn off this setting, on the *Tools *menu, click Options, and clear the Start tracing immediately after making connection check box.
In the Trace name box, type a name for the trace.
In the Use the template list, select a trace template on which to base the trace, or select Blank if you do not want to use a template.
To save the trace results, do one of the following:
Click Save to file to capture the trace to a file. Specify a value for Set maximum file size. The default value is 5 megabytes (MB).
Optionally, select Enable file rollover to automatically create new files when the maximum file size is reached. You can also optionally select Server processes trace data, which causes the service that is running the trace to process trace data instead of the client application. When the server processes trace data, no events are skipped even under stress conditions, but server performance may be affected.
Click Save to table to capture the trace to a database table.
Optionally, click Set maximum rows, and specify a value.
CAUTION!! When you do not save the trace results to a file or table, you can view the trace while SQL Server Profiler is open. However, you lose the trace results after you stop the trace and close SQL Server Profiler. To avoid losing the trace results in this way, click Save on the File menu to save the results before you close SQL Server Profiler.
Optionally, select the Enable trace stop time check box, and specify a stop date and time.
To add or remove events, data columns or filters, click the Events Selection tab. For more information, see: Specify Events and Data Columns for a Trace File (SQL Server Profiler)
Click Run to start the trace.
Permissions Required to Run SQL Server Profiler
SQL Server Profiler Templates and Permissions
SQL Server Profiler
Correlate a Trace with Windows Performance Log Data (SQL Server Profiler)
Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Create tables, views, and temporary objects - Training
This content is a part of Create tables, views, and temporary objects.
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Documentation
View and Analyze Traces - SQL Server
Find out how to use SQL Server Profiler to view trace data, find specific events, display object names, and troubleshoot problems.
Open a Trace File (SQL Server Profiler) - SQL Server
Learn how to open a file that contains event data that was captured during a trace. Get started opening trace files in SQL Server Profiler.
Create a Transact-SQL Script for Running a Trace - SQL Server Profiler
Find out how to create a Transact-SQL script from an existing trace file or table in SQL Server Profiler.