SQL Server Profiler template description

Source: Internet
Author: User
SQL Server Profiler templates http://msdn.microsoft.com/zh-cn/library/ms190176.aspx

You can use SQL Server Profiler to create a template and define the event classes and data columns to be included in the trail. After defining and saving the template, you can run a trail to record the data of each selected event class. You can use one template for multiple trails. The template itself is not executed.

SQL Server Profiler provides a pre-defined trace template that allows you to easily configure the event classes that may be the most needed for a specific trail. For example, the standard template helps you create a common trail to record logon, logout, completed batch processing, and connection information. You can use this template to run the trail without modifying it. You can also create other templates with different event Configurations Based on this template.

Note:
In addition to tracking using predefined templates, SQL Server Profiler allows you to create a trail from an empty template (which does not include any event classes by default. When the planned tracing does not match any predefined template configuration, it is very useful to use an empty tracing template.

SQL Server Profiler can trace various Server types. For example, you can track SQL Server 2000, analysis services, and SQL Server 2005 (and later ). However, the event classes that each server can contain are different. Therefore, SQL Server Profiler retains different templates for different servers and provides specific templates that match the selected server type.

Predefined Template

In addition to standard templates, SQL Server Profiler also contains predefined templates that can monitor specific types of events. The following table lists the predefined templates, their usage, and information about the event classes they capture.

Template Name Template usage Event Type

Sp_counts

Capture the execution behavior of stored procedures within a period of time.

SP: Starting

Standard

The general starting point for creating a trail. Capture all stored procedures and transact-SQL batch processing. Used to monitor Common Database Server activities.

Audit Login

Audit logout

Existingconnection

RPC: Completed

SQL: batchcompleted

SQL: batchstarting

Tsql

Capture all the transact-SQL statements submitted by the client to SQL Server and their issue time. Used to debug client applications.

Audit Login

Audit logout

Existingconnection

RPC: Starting

SQL: batchstarting

Tsql_duration

Capture all the transact-SQL statements submitted by the client to SQL Server and their execution time (in milliseconds), and group them by duration. Used to identify slow queries.

RPC: Completed

SQL: batchcompleted

Tsql_grouped

Capture all the transact-SQL statements submitted to SQL Server and their issue time. Information is grouped by users or clients who submit statements. Used to investigate queries sent by a client or user.

Audit Login

Audit logout

Existingconnection

RPC: Starting

SQL: batchstarting

Tsql_locks

The Transact-SQL statement that captures the client and submits the exception lock event to SQL Server. Used to troubleshoot deadlocks, lock timeouts, and lock upgrade events.

Blocked Process report

SP: stmtcompleted

SP: stmtstarting

SQL: stmtcompleted

SQL: stmtstarting

Deadlock Graph(For SQL Server 2005 or SQL Server 2008 instances .)

Lock: Cancel

Lock: deadlock

Lock: deadlock chain

Lock: Escalation

Lock: timeout(For SQL Server 2000 instances .)

Lock: timeout (timeout> 0)(For SQL Server 2005 or SQL Server 2008 instances .)

Tsql_replay

Capture detailed information about the transact-SQL statements required for replay tracking. Used for iterative optimization, such as benchmarking.

Cursorclose

Cursorexecute

Cursoropen

Cursorprepare

Cursorunprepare

Audit Login

Audit logout

Existing connection

RPC output parameter

RPC: Completed

RPC: Starting

Exec prepared SQL

Prepare SQL

SQL: batchcompleted

SQL: batchstarting

Tsql_sps

Capture detailed information about all stored procedures executed. The steps used to analyze the composition of stored procedures. If you suspect that the process is being re-compiled, addSP: recompileEvent.

Audit Login

Audit logout

Existingconnection

RPC: Starting

SP: Completed

SP: Starting

SP: stmtstarting

SQL: batchstarting

Tuning

Capture information about stored procedures and execution of transact-SQL batch processing. Used to generate a trace output. The database engine optimization consultant can use the output as a workload to optimize the database.

RPC: Completed

SP: stmtcompleted

SQL: batchcompleted

For more information about event classes, see SQL Server event class reference.

Default Template

SQL Server Profiler automatically specifiesStandardThe template is the default template applied to any new trail. However, you can change the default template to any other predefined template or user-defined template. To change the default template, use"Trace template attributes"Dialog Box"Regular"When you create or edit a template on the tab, select"Used as the default template for the selected server type"Check box.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.