| title | Start SQL Server Profiler | Microsoft Docs | |||
|---|---|---|---|---|
| ms.custom | ||||
| ms.date | 03/14/2017 | |||
| ms.prod | sql-server-2016 | |||
| ms.reviewer | ||||
| ms.suite | ||||
| ms.technology |
|
|||
| ms.tgt_pltfrm | ||||
| ms.topic | article | |||
| helpviewer_keywords |
|
|||
| ms.assetid | 22e57ffa-63b0-4de3-b92e-df297dda1226 | |||
| caps.latest.revision | 25 | |||
| author | JennieHubbard | |||
| ms.author | jhubbard | |||
| manager | jhubbard |
You can start [!INCLUDEssSqlProfiler] in several different ways to support gathering trace output in a variety of scenarios. You can start [!INCLUDEssSqlProfiler] include from the Start menu, from the Tools menu in [!INCLUDEssDE] Tuning Advisor, and from several locations in [!INCLUDEssManStudioFull].
When you first start [!INCLUDEssSqlProfiler] and select New Trace from the File menu, the application displays a Connect to Server dialog box where you can specify the [!INCLUDEssNoVersion] instance to which you want to connect.
- On the Start menu, point to All Programs, point to [!INCLUDEssCurrentUI], point to Performance Tools, and then click SQL Server Profiler.
- On the [!INCLUDEssDE] Tuning Advisor Tools menu, click SQL Server Profiler.
[!INCLUDEssManStudioFull] starts each profiler session in its own instance and continues to run if you shutdown [!INCLUDEssManStudioFull].
You can start [!INCLUDEssSqlProfiler] from several locations in [!INCLUDEssManStudioFull], as illustrated in the following procedures. When [!INCLUDEssSqlProfiler] starts it loads the connection context, trace template, and filter context of its launch point.
- In the [!INCLUDEssManStudioFull] Tools menu, click SQL Server Profiler.
-
On the [!INCLUDEssManStudioFull] menu bar, click New Query.
-
In Query Editor, right-click and then select Trace Query in SQL Server Profiler.
[!NOTE]
The connection context is the editor connection, the trace template is TSQL_SPs, and the applied filter is SPID = query window SPID.
-
In Object Explorer, right-click an instance of [!INCLUDEssNoVersion], and then click Activity Monitor.
-
Click the Processes pane, right-click the process that you want to profile, and then click Trace Process in SQL Server Profiler.
[!NOTE]
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.
In Windows Authentication mode, the user account that runs [!INCLUDEssSqlProfiler] must have permission to connect to an instance of [!INCLUDEssNoVersion].
To perform tracing with [!INCLUDEssSqlProfiler], users must also have the ALTER TRACE permission.