You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Query Monitor is a standard SQL Server trace that collects all the events that occur on your SQL Server instance over a period of time. You can enable this option if you experience query timeouts or other performance issues.  For instances running SQL Server 2008 or higher, query monitoring is enabled by default.

The Query Monitor window allows you to enable or disable query monitoring using the Enable the Query Monitor check box.  You can also select the settings that are used:

Query data collection

You can select to collect query data using Extended Events (collect query data using Extended Events radio button) or SQL Trace (Collect query data using SQL Trace radio button).  For instances running SQL Server 2008 or higher, the Query Monitor uses by default Extended Events.  First introduced in SQL Server 2008, Extended Events provide a new mechanism to capture information about events inside the Database Engine and diagnose performance problems.  This functionality is highly efficient and lightweight.  For more information about using Extended Events, see the Microsoft document, Extended Events.

To capture query data for monitored pre-SQL Server 2008 instances, enable the SQL Trace collection option.  Note that enabling this option can degrade performance on your SQL Server.

SQL Trace and Query Execution Plans

Query Execution Plan capturing is not available if you choose SQL Trace for the Query Monitor.  Upon selecting the Collect query data using SQL Trace radio button, the Collect Query Plans (SQL Server 2008 and up only) check box is disabled.

Query Execution Plans collection

Query Execution Plans display how the SQL Server Database Engine navigates tables and uses indexes to access or process the data for a query or other DML Statement.  To analyze a slow-running query, you can examine the query execution plan and pinpoint the root of the problem.

You can choose to collect or not query execution plans by clicking the Collect Query Plans (SQL Server 2008 and up only) check box in the Query Monitor window.  For instances running SQL Server 2008 or higher, this option is enabled by default.

Selecting the Collect query data using SQL Trace option in the Query Monitor, does not allow for the collection of query execution plans.

Capturing poorly-performing queries

The types of poorly-performing queries to capture include:

  • SQL batches
  • SQL Statements
  • Stored procedures and triggers

You can also define specific poorly-performing thresholds such as duration, logical disk reads, CPU usage, and physical disk writes.

Access the Query Monitor tab

You can access the Query Monitor tab of the Monitored SQL Server Properties window by right-clicking the appropriate SQL Server instance, and then selecting Properties. Click Query Monitor when SQLdm displays the Monitored SQL Server Properties window.

Diagnosing specific performance issues

Select the events that help you best diagnose the specific issues occurring with query performance on your SQL Server instance.  For example, you may want to monitor queries taking a long time to complete, requiring heavy CPU usage, and causing a large number of logical disk reads or physical disk writes, which indicates a memory issue.

SQLdm uses tracing to locate and flag worst-performing T-SQL. SQLdm cannot display binary data in a readable format. If you captured DTS packages, you may see unreadable characters in the Command field of the Tree View. Capturing DTS data may also adversely affect the performance of the SQL Server or Data Warehouse you are monitoring.

Using advanced Query Monitor configuration options

You can choose the applications, databases, and SQL text you want to include or exclude using the options available on the Advanced Query Monitor Configuration window . You can access this window by clicking the Advanced button on the Query Monitor tab.

You can also configure these options directly from the new advanced query views in the SQLdm web console.

 

SQL  Diagnostic Manager identifies and resolves SQL Server performance problems before they happen. Learn more > >
  • No labels