Please tell me the title of the table in the "SQL Profiler" of MSSQL, such as cpu,read,write,duration,spid ... Interpretation of _mssql

Source: Internet
Author: User
Tags error status code mssql in domain
SQL Profiler Data columns
SQL Profiler allows you to select a data column when you create a template. These data columns represent the information that you want to return when you run the trace. The data that is displayed in SQL Profiler can be displayed in the order in which the event occurred, or grouped by one data column or combination of data columns.

For example, to identify the user events with the longest execution time, group the events by Dbusername and Duration. SQL Profiler Displays the execution time for each event. This feature is similar to the GROUP BY clause in Transact-SQL. For more information, see GROUP by.



Description You cannot group by starttime or endtime data columns.


If SQL Profiler can connect to the Microsoft®sql Server™ instance where the trace data is captured, you will attempt to populate the database ID, Object ID, and The Index ID data column. Otherwise, an identification number (ID) is displayed.

The following table describes the SQL Profiler data columns that are selected by default.

Data Column number Description
Application Name1 10 Creates a client application name for a connection to an instance of SQL Server. The column is populated by the value passed by the application, not by the displayed program name.
Binary Data 2 is the binary value associated with the event class captured in the trace.
ClientProcessID1 9 is assigned to the ID of the process by the host computer, in which the client application is running. This data column is populated if the client provides a client process ID.
Column Permissions 44 Indicates whether the columns permission has been set. Parse the statement text to determine which permissions are applied to which columns.
Total CPU time (in milliseconds) used by the CPU 18 event.
The database ID specified by the ID1 3 Use database statement, or the default database if no USE DATABASE statement has been issued for a given instance.   SQL Profiler Displays the database name if the server name data column is captured within the trace and the servers are available. Determine the value of a database by using the DB_ID function.
DatabaseName 35 The name of the database that is running the user statement.
The SQL Server username for the DBUserName1 40 client.
Total amount of time, in milliseconds, spent Duration the 13 event.
End time 15 when the event ends. The column for the event class that initiates the event, such as Sql:batchstarting or sp:starting, is not populated.
Error 31 The fault number for the given event. is usually the error number stored in the sysmessages.
EventClass1 27 The event class type captured.
EventSubClass1 the type of the 21 event subclass, providing further information about each event class. For example, the event subclass value of the Execution Warning event class represents the type of execution warning:
1 = query wait. The query must wait for resources, such as memory, to execute.
2 = query timeout. The query timed out while waiting for the required resources to execute. The data column for all event classes is not populated.

The logical name of the file modified by FileName 36.
Handle an integer used by ODBC, OLE DB, or db-library to coordinate server execution.
Host Name1 8 is running the client's computer name. This data column is populated if the client provides a host name. To determine the host name, use the HOST_NAME function.
Index ID 24 on the object affected by the event. To determine the index ID of an object, use the indid column of the sysindexes system table.
Integer Data 25 is the integer value associated with the event class captured in the trace.
LoginName 11 User's login name (SQL Server secure login or Microsoft Windows® logon credentials, in domain\username format).
Security identification Number (SID) of the LOGINSID1 41 logged-on user. You can find this information in the sysxlogins table of the master database. For each login in the server, the SID is unique.
Mode 32 An integer used for different events to describe the state in which the event was received or requested.
Nestlevel 29 is an integer that represents the data returned by the @ @NESTLEVEL.
NT Domain Name1 7 users belong to a Microsoft Windows nt®4.0 or Windows 2000 domain.
NT User Name1 6 Windows NT 4.0 or Windows 2000 user name.
Object ID 22 The ID of the system assignment.
The name of the object referenced by ObjectName 34.
ObjectType 28 represents the value of the object type involved in the event. This value corresponds to the Type column in sysobjects.
The name of the database user for Owner name 37 object owners.
Permissions 19 represents an integer value for the type of permission being checked. Values are:
1 = SELECT All
2 = UPDATE All
4 = REFERENCES All
8 = INSERT
= DELETE
= EXECUTE (Procedure only)
4096 = SELECT any (at least one column)
8192 = UPDATE Any
16384 = REFERENCES Any

Reads 16 The number of logical disk reads that the server performs on behalf of the event.
RoleName 38 The name of the application role to enable.
The SQL Server instance name that is tracked by Server Name1 26.
Severity The severity level of the 20 exception error.
SPID1 the client-related server process ID assigned by SQL Server.
Start Time1 14 time to start the event (when available).
State 30 is equivalent to an error status code.
Success 23 Indicates whether the event was successful. Values include:
1 = success.
0 = Failed

For example, 1 indicates a successful permission check, and 0 indicates that the check failed.

Targetloginname 42 is the name of the target login for actions that target a login (for example, adding a new login).
Targetloginsid 43 is the SID of the target login for operations that are logged on as a target (for example, adding a new login).
TargetUserName 39 is the user's name for operations that target a database user, such as granting a user permission.
TextData 1 is the text value associated with the event class captured within the trace. However, if you are tracking a parameterized query, the variable is not displayed as a data value in the TextData column.
Transaction ID 4 The system-assigned transaction ID.
Writes 17 The number of physical disk writes performed by the server on behalf of the event.


1 Populate these data columns for all events by default.



The definition of a filter is based on your tracking purpose, and the filtered columns that are usually defined include:

1.DatabaseName with the name of the database you want to monitor (but this does not seem to work, my Computer settings are invalid)
2.DatabaseID with the dbid of the database you want to test, you can get dbid with the Select db_id (N ' You want to monitor the Library name ')
3.ObjectName with the object name you want to monitor, such as table name, view name, etc.
4.ObjectID with the ID of the object you want to monitor, you can get the ID with select OBJECT_ID (N ' object name you want to monitor)
5.Error is the same as the error, if a numbered error occurs frequently, the error number
6.Seccess with 0, failure, 1, success, if it is wrong, filter out the successful processing

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.