SQL Server Profiler Data Columns Explained

Overview

A data column is a piece of data that describes some part of an event that occurred in your database. Things like login, start_time, event success or failure are all different types of data that can be collected for an event that is configured in your SQL trace session.

Explanation

There are over 60 data columns that can be added to a trace, but depending on which event you have selected a given data column may or may not be available depending on whether or not it is applicable to that event. A complete listing with a detailed description is noted in the additional items at the bottom of this topic. Please note that in order to see the description of the data columns that are available you need to first select the event you are interested in configuring. Below are some of the more common data columns that you will almost always see selected for an event if it’s applicable.

EventDescription
TextDataText of the batch of statements entered. i.e. a TSQL command
LoginNameName of the user who that executed the statement, either a SQL or Windows login
CPUAmount of CPU in milliseconds used by the statement.
ReadsNumber of page read I/Os caused by the statement.
WritesNumber of page write I/Os caused by the statement.
DurationAmount of time taken in milliseconds for the statement to complete.
SPIDID of the session on which the event occurred.
StartTimeStart time of the event.
EndTimeEnd time of the event.
DatabaseNameName of the database in which the statement is running.
DBIDDatabase identifier in which the statement is running.
HostNameName of the computer on which the client who is executing the statement is running.
ServerNameName of the SQL instance being traced.
RowCountsNumber of rows (if any) effected by the event.
Error0= OK, 1=Error, 2=Abort

How to add Data Columns in SQL Server Profiler

To add data columns to a trace session we go to the “Events Selection” tab I showed in the previous topic. If you notice in the screenshot below there is a checkbox “Show all columns”. If you check this box the window above will display checkboxes for each data column that is available for any events that are open. Alternatively you can select individual data columns for each event. To select the data columns you can either select the data column itself or select the event which will check every data column for that event (as we did in the previous topic). In my example below I selected all data columns for the Errolog event and only the TextData data column for the Blocked process report event.

SQL Profiler - Event Selection Tab

Additional Information

Leave a Reply

Your email address will not be published. Required fields are marked *