Use of Profiler in SQL Server

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

1. Click Start-Program--microsoft SQL Server 2008--Performance tool--sql Server Profiler, such as:

    2. Then go to SQL Server Profiler window:    3, in the work window pops the Data Connection window, enters the data connection the server and the user name password, 4, after the input completes, clicks the connection button, pops up the Tracking Property window, the window left the "General" tab is a basic setting, generally uses the default to be OK. The Event Selection tab on the right is used to set what events to track, list of events can be selected, and basically there are events on SQL, including the procedure you can follow to manipulate the database with SQL Server Management Studio.   Just click Show all events to make the selection of all events. 5. In the Event Selection tab, you can also filter the statistics fields, and click any of the column headings to see a description of the column, such as: 6, followed by:

TextDate relies on the text value of the event class captured in the trace;

ApplicationName the name of the client application that created the SQL Server connection. This column is populated by the value passed by the application, not by the program name that is displayed;

Ntusername the Windows user name.

LoginName User's login name (SQL Server secure logon or Windows logon credentials, in the format "domain \ User name")

CPU time (in milliseconds) that is used by the CPUs event.

Reads the number of times the logical disk was read by the server on behalf of the event.

Writes the number of times that the server writes physical disks on behalf of events.

The time that the Duration event takes. Although the server calculates the duration in microseconds, SQL Server Profiler can display the value in milliseconds, depending on the settings in the Tools > Options dialog box

ClientProcessID the process ID of the application calling SQL Server.

SPID SQL Server assigns the server process ID to the associated process for the client.

The start time of the Strattime event (if available).

The time at which the EndTime event ended. This column is not populated for event classes that indicate the start of an event, such as Sql:batchstarting or sp:starting.

BinaryData relies on the binary values of the event classes captured in the trace.

With the above figure we can clearly track each step is the process. From the window can also clearly see the detailed SQL statement, if the SQL statement is ambiguous or do not understand the words can refer to the above, and is always, in SQL operation a few here will appear corresponding SQL statement, this is a learning and improve the good tool, not only this, We can also analyze the data, query, tracking can pause, start and stop operations, can start multiple traces at the same time, tracking different databases and tables, if and SQL Database Engine Tuning Advisor with the use of the better, you can analyze the performance of your SQL statement if, And will tell you how to modify it better.

  

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.