Server Performance and Activity Monitoring
Applies to: SQL Server
The goal of monitoring databases is to assess how a server is performing. Effective monitoring involves taking periodic snapshots of current performance to isolate processes that are causing problems, and gathering data continuously over time to track performance trends. Microsoft SQL Server and the Microsoft Windows operating system provide utilities that let you view the current condition of the database and to track performance as conditions change.
The following section contains topics that describe how to use SQL Server and Windows performance and activity monitoring tools. It contains the following topics:
To perform monitoring tasks with Windows tools
To create SQL Server database alerts with Windows tools
To perform monitoring tasks with Extended Events
Convert an Existing SQL Trace Script to an Extended Events Session
View the Extended Events Equivalents to SQL Trace Event Classes
To perform monitoring tasks with SQL Server Management Studio
To perform monitoring tasks with SQL Trace and SQL Server Profiler
Important
The next sections describe methods of using SQL Trace and SQL Server Profiler.
SQL Trace and SQL Server Profiler are deprecated. The Microsoft.SqlServer.Management.Trace namespace that contains the Microsoft SQL Server Trace and Replay objects are also deprecated.
This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
Use Extended Events instead. For more information on Extended Events, see Quick Start: Extended events in SQL Server and SSMS XEvent Profiler.
Note
SQL Server Profiler for Analysis Services workloads is NOT deprecated, and will continue to be supported.
To perform monitoring tasks with SQL Trace by using Transact-SQL stored procedures
To create and modify traces by using SQL Server Profiler
Specify Events and Data Columns for a Trace File (SQL Server Profiler)
Create a Transact-SQL Script for Running a Trace (SQL Server Profiler)
Set a Maximum File Size for a Trace File (SQL Server Profiler)
Set a Maximum Table Size for a Trace Table (SQL Server Profiler)
Filter Events Based on the Event Start Time (SQL Server Profiler)
Filter Events Based on the Event End Time (SQL Server Profiler)
Filter Server Process IDs (SPIDs) in a Trace (SQL Server Profiler)
To start, pause, and stop traces by using SQL Server Profiler
Start a Trace Automatically after Connecting to a Server (SQL Server Profiler)
Run a Trace After It Has Been Paused or Stopped (SQL Server Profiler)
To open traces and configure how traces are displayed by using SQL Server Profiler
To replay traces by using SQL Server Profiler
To create, modify, and use trace templates by using SQL Server Profiler
Derive a Template from a Running Trace (SQL Server Profiler)
Derive a Template from a Trace File or Trace Table (SQL Server Profiler)