Run SQL Server Profiler
You can run SQL Server Profiler in several different ways, to support gathering trace output in a variety of scenarios. You can start SQL Server Profiler from the Windows 10 Start menu, from the Tools menu in Database Engine Tuning Advisor, and from several locations in SQL Server Management Studio.
When you first start SQL Server Profiler and select New Trace from the File menu, the application displays a Connect to Server dialog box where you can specify a SQL Server instance to connect to.
To start SQL Server Profiler from the Windows 10 Start menu
- Click the Windows Start icon or press the Windows key and start to type "SQL Server Profiler 17". When the SQL Server Profiler 17 tile appears, click it.
To start SQL Server Profiler in Database Engine Tuning Advisor
- On the Database Engine Tuning Advisor Tools menu, click SQL Server Profiler.
To start SQL Server Profiler in SQL Server Management Studio
You can start SQL Server Profiler from several locations in SQL Server Management Studio. When SQL Server Profiler starts, it loads the connection context, trace template, and filter context of its launch point. SQL Server Management Studio starts each SQL Server Profiler session in its own instance, and Profiler continues to run if you shut down SQL Server Management Studio.
To start SQL Server Profiler from the Tools menu
- In the SQL Server Management Studio Tools menu, click SQL Server Profiler.
To start SQL Server Profiler from the Query Editor
In Query Editor, right-click and then select Trace Query in SQL Server Profiler.
The connection context is the editor connection, the trace template is TSQL_SPs, and the applied filter is SPID = query window SPID.
To start SQL Server Profiler from Activity Monitor
In Activity Monitor, click the Processes pane, right-click the process that you want to profile, and then click Trace Process in SQL Server Profiler.
When a process is selected, the connection context is the Object Explorer connection when Activity Monitor was opened. The trace template is the default based on the server type, and the SPID equals the SPID for the selected process.
.NET Framework Security
- In Windows Authentication mode, the user account that runs SQL Server Profiler must have permission to connect to the instance of SQL Server.
- To perform tracing with SQL Server Profiler, users must also have the ALTER TRACE permission.