Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Table of Contents Overview Broker Event Category Broker:Activation Event Class Broker:Conversation Event Class Broker:Conversation Group Event Class Broker:Connection Event Class Broker:Corrupted Message Event Class Broker:Forwarded Message Sent Event Class Broker:Forwarded Message Dropped Event Class Broker:Message Classify Event Class Broker:Message Drop Event Class Broker:Remote Message Ack Event Class Cursors Event Category CursorClose Event Class CursorExecute Event Class CursorImplicitConversion Event Class CursorOpen Event Class CursorPrepare Event Class CursorRecompile Event Class CursorUnprepare Event Class CLR Event Category Database Event Category Data File Auto Grow Event Class Data File Auto Shrink Event Class Database Mirroring Connection Event Class Database Mirroring State Change Event Class Log File Auto Grow Event Class Log File Auto Shrink Event Class Deprecation Event Category Deprecation Announcement Event Class Deprecation Final Support Event Class Errors and Warnings Event Category (Database Engine) Attention Event Class Background Job Error Event Class Bitmap Warning Event Class Blocked Process Report Event Class CPU Threshold Exceeded Event Class Database Suspect Data Page Event Class ErrorLog Event Class EventLog Event Class Exception Event Class Exchange Spill Event Class Execution Warnings Event Class Hash Warning Event Class Missing Column Statistics Event Class Missing Join Predicate Event Class Sort Warnings Event Class User Error Message Event Class Full Text Event Category FT:Crawl Aborted Event Class FT:Crawl Started Event Class FT:Crawl Stopped Event Class Locks Event Category Deadlock Graph Event Class Lock:Acquired Event Class Lock:Cancel Event Class Lock:Deadlock Chain Event Class Lock:Deadlock Event Class Lock:Escalation Event Class Lock:Released Event Class Lock:Timeout (timeout > 0) Event Class Lock:Timeout Event Class Objects Event Category Object:Altered Event Class Object:Created Event Class Object:Deleted Event Class OLEDB Event Category OLEDB Call Event Class OLEDB DataRead Event Class OLEDB Errors Event Class OLEDB Provider Information Event Class OLEDB QueryInterface Event Class Performance Event Category Auto Stats Event Class Degree of Parallelism (7.0 Insert) Event Class Performance Statistics Event Class Showplan All Event Class Showplan All for Query Compile Event Class Showplan Statistics Profile Event Class Showplan Text Event Class Showplan Text (Unencoded) Event Class Showplan XML Event Class Showplan XML for Query Compile Event Class Showplan XML Statistics Profile Event Class SQL:FullTextQuery Event Class Plan Guide Successful Event Class Plan Guide Unsuccessful Event Class Progress Report Event Category Progress Report: Online Index Operation Event Class Query Notifications Event Category QN:Dynamics Event Class QN:Parameter Table Event Class QN:Subscription Event Class QN:Template Event Class Scans Event Category Scan:Started Event Class Scan:Stopped Event Class Security Audit Event Category (SQL Server Profiler) Audit Add DB User Event Class Audit Add Login to Server Role Event Class Audit Add Member to DB Role Event Class Audit Add Role Event Class Audit Addlogin Event Class Audit App Role Change Password Event Class Audit Backup and Restore Event Class Audit Broker Conversation Event Class Audit Broker Login Event Class Audit Change Audit Event Class Audit Change Database Owner Event Class Audit Database Management Event Class Audit Database Mirroring Login Event Class Audit Database Object Access Event Class Audit Database Object GDR Event Class Audit Database Object Management Event Class Audit Database Object Take Ownership Event Class Audit Database Operation Event Class Audit Database Principal Impersonation Event Class Audit Database Principal Management Event Class Audit Database Scope GDR Event Class Audit DBCC Event Class Audit Fulltext Event Class Audit Login Change Password Event Class Audit Login Change Property Event Class Audit Login Event Class Audit Login Failed Event Class Audit Login GDR Event Class Audit Logout Event Class Audit Object Derived Permission Event Class Audit Schema Object Access Event Class Audit Schema Object GDR Event Class Audit Schema Object Management Event Class Audit Schema Object Take Ownership Event Class Audit Server Alter Trace Event Class Audit Server Object GDR Event Class Audit Server Object Management Event Class Audit Server Object Take Ownership Event Class Audit Server Operation Event Class Audit Server Principal Impersonation Event Class Audit Server Principal Management Event Class Audit Server Scope GDR Event Class Audit Server Starts and Stops Event Class Audit Statement Permission Event Class Server Event Category Mount Tape Event Class Server Memory Change Event Class Trace File Close Event Class Sessions Event Category ExistingConnection Event Class Stored Procedures Event Category PreConnect:Completed Event Class PreConnect:Starting Event Class RPC:Completed Event Class RPC Output Parameter Event Class RPC:Starting Event Class SP:CacheHit Event Class SP:CacheInsert Event Class SP:CacheMiss Event Class SP:CacheRemove Event Class SP:Completed Event Class SP:Recompile Event Class SP:Starting Event Class SP:StmtCompleted Event Class SP:StmtStarting Event Class Transactions Event Category DTCTransaction Event Class SQLTransaction Event Class TM: Begin Tran Completed Event Class TM: Begin Tran Starting Event Class TM: Commit Tran Completed Event Class TM: Commit Tran Starting Event Class TM: Promote Tran Completed Event Class TM: Promote Tran Starting Event Class TM: Rollback Tran Completed Event Class TM: Rollback Tran Starting Event Class TM: Save Tran Completed Event Class TM: Save Tran Starting Event Class TransactionLog Event Class TSQL Event Category Exec Prepared SQL Event Class Prepare SQL Event Class SQL:BatchCompleted Event Class SQL:BatchStarting Event Class SQL:StmtCompleted Event Class SQL:StmtRecompile Event Class SQL:StmtStarting Event Class Unprepare SQL Event Class XQuery Static Type Event Class User-Configurable Event Category User-Configurable Event Class ObjectType Trace Event Column SQL Server Event Class Reference 3/24/2017 • 5 min to read • Edit Online SQL Server Profiler lets you record events as they occur in an instance of the Microsoft SQL Server Database Engine. The recorded events are instances of the event classes in the trace definition. In SQL Server Profiler, event classes and their event categories are available on the Events Selection tab of the Trace File Properties dialog box. The following table describes the event categories and lists their associated event classes. EVENT CATEGORY EVENT CLASSES The Broker Event Category includes event classes that are produced by the Service Broker. Broker:Activation Event Class Broker:Connection Event Class Broker:Conversation Event Class Broker:Conversation Group Event Class Broker:Corrupted Message Event Class Broker:Forwarded Message Dropped Event Class Broker:Forwarded Message Sent Event Class Broker:Message Classify Event Class Broker:Message Drop Event Class Broker:Remote Message Ack Event Class The Cursors Event Category includes event classes that are produced by cursor operations. CursorClose Event Class CursorExecute Event Class CursorImplicitConversion Event Class CursorOpen Event Class CursorPrepare Event Class CursorRecompile Event Class CursorUnprepare Event Class The CLR Event Category includes event classes that are produced by the execution of .NET common language runtime (CLR) objects. Assembly Load Event Class EVENT CATEGORY EVENT CLASSES The Database Event Category includes event classes that are produced when data or log files grow or shrink automatically. Data File Auto Grow Event Class Data File Auto Shrink Event Class Database Mirroring State Change Event Class Log File Auto Grow Event Class Log File Auto Shrink Event Class The Deprecation Event Category includes deprecation related events. Deprecation Announcement Event Class Deprecation Final Support Event Class The Errors and Warnings Event Category (Database Engine) includes event classes that are produced when a SQL Server error or warning is returned, for example, if an error occurs during the compilation of a stored procedure or an exception occurs in SQL Server. Attention Event Class Background Job Error Event Class Blocked Process Report Event Class CPU Threshold Exceeded Event Class ErrorLog Event Class EventLog Event Class Exception Event Class Exchange Spill Event Class Execution Warnings Event Class Hash Warning Event Class Missing Column Statistics Event Class Missing Join Predicate Event Class Sort Warnings Event Class User Error Message Event Class The Full Text Event Category includes event classes that are produced when full-text searches are started, interrupted, or stopped. FT:Crawl Aborted Event Class FT:Crawl Started Event Class FT:Crawl Stopped Event Class EVENT CATEGORY EVENT CLASSES The Locks Event Category includes event classes that are produced when a lock is acquired, cancelled, released, or has some other action performed on it. Deadlock Graph Event Class Lock:Acquired Event Class Lock:Cancel Event Class Lock:Deadlock Chain Event Class Lock:Deadlock Event Class Lock:Escalation Event Class Lock:Released Event Class Lock:Timeout (timeout > 0) Event Class Lock:Timeout Event Class The Objects Event Category includes event classes that are produced when database objects are created, opened, closed, dropped, or deleted. Auto Stats Event Class Object:Altered Event Class Object:Created Event Class Object:Deleted Event Class The OLEDB Event Category includes event classes that are produced by OLE DB calls. OLEDB Call Event Class OLEDB DataRead Event Class OLEDB Errors Event Class OLEDB Provider Information Event Class OLEDB QueryInterface Event Class The Performance Event Category includes event classes that are produced when SQL data manipulation language (DML) operators execute. Degree of Parallelism (7.0 Insert) Event Class Performance Statistics Event Class Showplan All Event Class Showplan All for Query Compile Event Class Showplan Statistics Profile Event Class Showplan Text Event Class Showplan Text (Unencoded) Event Class Showplan XML Event Class Showplan XML for Query Compile Event Class Showplan XML Statistics Profile Event Class SQL:FullTextQuery Event Class EVENT CATEGORY EVENT CLASSES The Progress Report Event Category includes the Progress Report: Online Index Operation event class. Progress Report: Online Index Operation Event Class The Scans Event Category includes event classes that are produced when tables and indexes are scanned. Scan:Started Event Class Scan:Stopped Event Class The Security Audit Event Category includes event classes that are used to audit server activity. Audit Add DB User Event Class Audit Add Login to Server Role Event Class Audit Add Member to DB Role Event Class Audit Add Role Event Class Audit Addlogin Event Class Audit App Role Change Password Event Class Audit Backup and Restore Event Class Audit Broker Conversation Event Class Audit Broker Login Event Class Audit Change Audit Event Class Audit Change Database Owner Event Class Audit Database Management Event Class Audit Database Object Access Event Class Audit Database Object GDR Event Class Audit Database Object Management Event Class Audit Database Object Take Ownership Event Class Audit Database Operation Event Class Audit Database Principal Impersonation Event Class Audit Database Principal Management Event Class Audit Database Scope GDR Event Class Audit DBCC Event Class Audit Login Change Password Event Class Audit Login Change Property Event Class Audit Login Event Class Audit Login Failed Event Class Audit Login GDR Event Class Audit Logout Event Class Audit Object Derived Permission Event Class Audit Object Derived Permission Event Class EVENT CATEGORY EVENT CLASSES Audit Schema Object Access Event Class Audit Schema Object GDR Event Class Audit Schema Object Management Event Class Audit Schema Object Take Ownership Event Class Audit Server Alter Trace Event Class Audit Server Object GDR Event Class Audit Server Object Management Event Class Audit Server Object Take Ownership Event Class Audit Server Operation Event Class Audit Server Principal Impersonation Event Class Audit Server Principal Management Event Class Audit Server Scope GDR Event Class Audit Server Starts and Stops Event Class Audit Statement Permission Event Class The Server Event Category contains general server events. Mount Tape Event Class Server Memory Change Event Class Trace File Close Event Class The Sessions Event Category includes event classes produced by clients connecting to and disconnecting from an instance of SQL Server. ExistingConnection Event Class EVENT CATEGORY EVENT CLASSES The Stored Procedures Event Category includes event classes produced by the execution of stored procedures. PreConnect:Completed Event Class PreConnect:Starting Event Class RPC:Completed Event Class RPC Output Parameter Event Class RPC:Starting Event Class SP:CacheHit Event Class SP:CacheInsert Event Class SP:CacheMiss Event Class SP:CacheRemove Event Class SP:Completed Event Class SP:Recompile Event Class SP:Starting Event Class SP:StmtCompleted Event Class SP:StmtStarting Event Class The Transactions Event Category includes event classes produced by the execution of Microsoft Distributed Transaction Coordinator transactions or by writing to the transaction log. DTCTransaction Event Class SQLTransaction Event Class TM: Begin Tran Completed Event Class TM: Begin Tran Starting Event Class TM: Commit Tran Completed Event Class TM: Commit Tran Starting Event Class TM: Promote Tran Completed Event Class TM: Promote Tran Starting Event Class TM: Rollback Tran Completed Event Class TM: Rollback Tran Starting Event Class TM: Save Tran Completed Event Class TM: Save Tran Starting Event Class TransactionLog Event Class EVENT CATEGORY EVENT CLASSES The TSQL Event Category includes event classes produced by the execution of Transact-SQL statements passed to an instance of SQL Server from the client. Exec Prepared SQL Event Class Prepare SQL Event Class SQL:BatchCompleted Event Class SQL:BatchStarting Event Class SQL:StmtCompleted Event Class SQL:StmtRecompile Event Class SQL:StmtStarting Event Class Unprepare SQL Event Class XQuery Static Type Event Class The User-Configurable Event Category includes event classes that you can define. See Also SQL Server Profiler User-Configurable Event Class Broker Event Category 3/24/2017 • 1 min to read • Edit Online The Broker event category contains general Service Broker events. In This Section TOPIC DESCRIPTION Broker:Activation Event Class An event generated when a queue monitor starts an activation stored procedure. Broker:Connection Event Class An event generated to report the status of a transport connection managed by Service Broker. Broker:Conversation Event Class An event generated to report the progress of a conversation. Broker:Conversation Group Event Class An event generated when the database creates or drops a conversation group. Broker:Corrupted Message Event Class An event generated to report that the database has received a corrupt message. Broker:Forwarded Message Dropped Event Class An event generated when SQL Server drops a Service Broker message that was to have been forwarded. Broker:Forwarded Message Sent Event Class An event generated when SQL Server forwards a Service Broker message. Broker:Message Classify Event Class An event generated when Service Broker determines the routing for a message. Broker:Message Drop Event Class An event generated when Service Broker is unable to retain a received message that should have been delivered to a service in this instance Broker:Remote Message Ack Event Class An event generated when Service Broker sends or receives a message acknowledgement. Two security audit events are also provided for Service Broker. For more information on those events, see Audit Broker Login Event Class and Audit Broker Conversation Event Class. See Also Security Audit Event Category Broker:Activation Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Broker:Activation event when a queue monitor starts an activation stored procedure, sends a QUEUE_ACTIVATION notification, or when an activation stored procedure started by a queue monitor exits. Broker:Activation Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int The type of event class captured. Always 163 for Broker:Activation. 27 No EventSequence int Sequence number for this event. 51 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSubClass nvarchar The specific action that this event reports. One of the following values: 21 No start: SQL Server started an activation stored procedure. ended: The activation stored procedure exited normally. aborted: The activation stored procedure exited with an error. HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The number of tasks active on this queue. 25 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectID int The queue associated with this event. 22 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes TransactionID bigint The system-assigned ID of the transaction. 4 No Broker:Conversation Event Class 3/24/2017 • 7 min to read • Edit Online SQL Server generates a Broker:Conversation event to report the progress of a Service Broker conversation. Broker:Conversation Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application instead of the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database that is specified by the USE database statement. If no USE databasestatement has been issued, the ID of the default database. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int The type of event class captured. Always 124 for Broker:Conversatio n. 27 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass. This provides more information about each event class. 21 Yes GUID uniqueidentifier The conversation ID of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes MethodName nvarchar The conversation group that the conversation belongs to. 47 No NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The conversation handle of the dialog. 34 No Priority int The priority level of the conversation 5 Yes RoleName nvarchar The role of the conversation handle. This is either initiator or target. 38 No ServerName nvarchar The name of the instance of SQL Server that is being traced. 26 No Severity int The SQL Server error severity, if this event reports an error. 29 No SPID int The server process ID that is assigned by SQL Server to the process that is associated with the client. 12 Yes StartTime datetime The time when the event started, when available. 14 Yes TextData ntext The current state of the conversation. Can have one of the following values: 1 Yes SO. Started outbound. SQL Server processed a BEGIN CONVERSATION for this conversation, but no messages have been sent. DATA COLUMN TYPE DESCRIPTION SI. Started inbound. Another instance of the Database Engine started a new conversation with the current instance, but the current instance has not finished receiving the first message. SQL Server might create the conversation in this state if the first message is fragmented or SQL Server receives messages out of order. However, SQL Server might create the conversation in the CO state if the first transmission that was received for the conversation contains the complete first message. CO. Conversing. The conversation is established, and both sides of the conversation can send messages. Most communication for a typical service happens when the conversation is in this state. COLUMN NUMBER FILTERABLE DATA COLUMN TYPE DESCRIPTION DI. Disconnected inbound. The remote side of the conversation has issued an END CONVERSATION. The conversation remains in this state until the local side of the conversation issues an END CONVERSATION. An application can still receive messages for the conversation. Because the remote side of the conversation has ended the conversation, an application cannot send messages on this conversation. When an application issues an END CONVERSATION, the conversation moves to the Closed (CD) state. DO. Disconnected outbound. The local side of the conversation has issued an END CONVERSATION. The conversation remains in this state until the remote side of the conversation acknowledges the END CONVERSATION. An application cannot send or receive messages for the conversation. When the remote side of the conversation acknowledges the END CONVERSATION, the conversation moves to the Closed (CD) state. COLUMN NUMBER FILTERABLE DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE 4 No ER. Error. An error has occurred on this endpoint. The Error, Severity, and State columns contain information about the specific error that occurred. CD. Closed. The conversation endpoint is no longer in use. Transaction ID bigint The system-assigned ID of the transaction. The following table lists the subclass values for this event class. ID SUBCLASS DESCRIPTION 1 SEND Message SQL Server generates a SEND Message event when the Database Engine executes a SEND statement. 2 END CONVERSATION SQL Server generates an END CONVERSATION event when the Database Engine executes an END CONVERSATION statement that does not include the WITH ERROR clause. 3 END CONVERSATION WITH ERROR SQL Server generates an END CONVERSATION WITH ERROR event when the Database Engine executes an END CONVERSATION statement that includes the WITH ERROR clause. 4 Broker Initiated Error SQL Server generates a Broker Initiated Error event whenever Service Broker creates an error message. For example, when Service Broker cannot successfully route a message for a dialog, the broker creates an error message for the dialog and generates this event. SQL Server does not generate this event when an application program ends a conversation with an error. 5 Terminate Dialog Service Broker terminated the dialog. Service Broker terminates dialogs in response to conditions that prevent the dialog from continuing, but which are not errors or the normal end of a conversation. For example, dropping a service causes Service Broker to terminate all dialogs for that service. ID SUBCLASS DESCRIPTION 6 Received Sequenced Message SQL Server generates a Received Sequenced Message event class when SQL Server receives a message that contains a message sequence number. All user-defined message types are sequenced messages. Service Broker generates an unsequenced message in two cases: Error messages generated by Service Broker are unsequenced. Message acknowledgements might be unsequenced. For efficiency, Service Broker includes message any available acknowledgement as part of a sequenced message . However, if an application does not send a sequenced message to the remote endpoint within a certain period of time, Service Broker creates an unsequenced message for the message acknowledgement. 7 Received END CONVERSATION SQL Server generates a Received END CONVERSATION event when SQL Server receives an End Dialog message from the other side of the conversation. 8 Received END CONVERSATION WITH ERROR SQL Server generates a Received END CONVERSATION WITH ERROR event when SQL Server receives a userdefined error from the other side of the conversation. SQL Server does not generate this event when SQL Server receives a broker-defined error. 9 Received Broker Error Message SQL Server generates a Received Broker Error Message event when Service Broker receives a broker-defined error message from the other side of the conversation. SQL Server does not generate this event when Service Broker receives an error message that was generated by an application. For example, if the current database contains a default route to a forwarding database, Service Broker routes a message with an unknown service name to the forwarding database. If that database cannot route the message, the broker in that database creates an error message and returns that error message to the current database. When the current database receives the broker-generated error from the forwarding database, the current database generates a Received Broker Error Message event. ID SUBCLASS DESCRIPTION 10 Received END CONVERSATION Ack SQL Server generates a Received END CONVERSATION Ack event class when the other side of a conversation acknowledges an End Dialog or Error message sent by this side of the conversation. 11 BEGIN DIALOG SQL Server generates a BEGIN DIALOG event when the Database Engine executes a BEGIN DIALOG command. 12 Dialog Created SQL Server generates a Dialog Created event when Service Broker creates an endpoint for a dialog. Service Broker creates an endpoint whenever a new dialog is established, regardless of whether the current database is the initiator or the target of the dialog. 13 END CONVERSATION WITH CLEANUP SQL Server generates an END CONVERSATION WITH CLEANUP event when the Database Engine executes an END CONVERSATION statement that includes the WITH CLEANUP clause. See Also SQL Server Service Broker Broker:Conversation Group Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Broker:Conversation Group event when Service Broker creates a new conversation group or drops an existing conversation group. Broker:Conversation Group Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventClass int The type of event class captured. Always 136 for Broker:Conversatio n Group. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values: 21 Yes Create. SQL Server created a new conversation group. Drop. SQL Server deleted a conversation group. GUID uniqueidentifier The conversation group identifier of the conversation group that this event describes. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes TransactionID bigint The system-assigned ID of the transaction. 4 No Broker:Connection Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Broker:Connection event to report the status of a transport connection managed by Service Broker. Broker:Connection Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Error int The message ID number in sys.messages for the text in the event. If this event reports an error, this is the SQL Server error number. 31 No EventClass int The type of event class captured. Always 138 for Broker:Connection. 27 No EventSequence int Sequence number for this event. 51 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSubClass nvarchar The connection state of this connection. For this event, the subclass is one the following values. 21 Yes 54 No Connecting. SQL Server is initiating a transport connection. Connected. SQL Server has established a transport connection. Connect Failed. SQL Server failed to establish a transport connection. Closing. SQL Server is closing the transport connection. Closed. SQL Server has closed the transport connection. Accept. SQL Server has accepted a transport connection from another instance. Send IO Error. SQL Server encountered a transport error while sending a message. Receive IO Error. SQL Server encountered a transport error while receiving a message. GUID uniqueidentifier The endpoint ID of this connection. DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The number of times this connection has been closed. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The conversation handle of the dialog. 34 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TextData ntext The text of the error message related to the event. For events that do not report an error, this field is empty. The error message may either be a SQL Server error message or a Windows error message. 1 Yes TransactionID bigint The system-assigned ID of the transaction. 4 No See Also SQL Server Service Broker Broker:Corrupted Message Event Class 3/24/2017 • 3 min to read • Edit Online SQL Server creates a Broker:Corrupted Message event when Service Broker receives a corrupted message. Broker:Corrupted Message Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint The sequence number of this message. 52 No BinaryData image The message body of the message. 2 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes Error int The message id number in sys.messages for the text in the event. 31 No EventClass int The type of event class captured. Always 161 for Broker:Corrupted Message. 27 No EventSequence int Sequence number for this event. 51 No FileName nvarchar The network address of the remote endpoint. 36 No GUID uniqueidentifier The conversation ID of the conversation that the corrupted message belongs to. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Host Name nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The fragment number of this message. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The service name of the other side of the conversation and the connection string that the remote database used to connect to this database. 34 No RoleName nvarchar The role of the endpoint receiving this message. One of the following values. 38 No initiator: The receiving endpoint is the initiator of the conversation. target: The receiving endpoint is the target of the conversation. DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ServerName nvarchar The name of the instance of SQL Server being traced. 26 No Severity int If an error caused SQL Server to drop the message, the severity of the error. 29 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced. 30 No TextData ntext Description of the corruption detected. 1 Yes Transaction ID bigint The system-assigned ID of the transaction. 4 No The TextData column of this event contains a message that describes the problem with the message. Broker:Forwarded Message Sent Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Broker:Forwarded Message Sent event when Service Broker forwards a message. Broker:Forwarded Message Sent Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint Message sequence number. 52 No ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DBUserName nvarchar The broker instance id for the service that the message is from. 40 No EventClass int The type of event class captured. Always 139 for Broker:Forwarded Message Sent. 27 No EventSequence int Sequence number for this event. 51 No FileName nvarchar The name of the service that the message is to. 36 No GUID uniqueidentifier The conversation id of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int The number of hops remaining for the forwarded message. 24 No IntegerData int The fragment number of the forwarded message. 25 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectId int The time to live value for the forwarded message when the message was forwarded. 22 No ObjectName nvarchar Message ID of the forwarded message. 34 No OwnerName nvarchar The broker identifier that the message is directed to. 37 No RoleName nvarchar The role of the conversation handle. Valid values are: 38 No Initiator. This broker initiated the conversation. Target. This broker is the target of the conversation. ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Success int The amount of time consumed during the forwarding process. 23 No TargetLoginName nvarchar The network address that this instance sent the message to. Notice that this may be different than the final destination for the message. 42 No TargetUserName nvarchar The name of the initiating service for the message. 39 No TransactionID bigint The system-assigned ID of the transaction. 4 No Broker:Forwarded Message Dropped Event Class 3/24/2017 • 3 min to read • Edit Online SQL Server generates a Broker:Forwarded Message Dropped event when Service Broker drops a message that was intended to be forwarded. Broker:Forwarded Message Dropped Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint Message sequence number. 52 No ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseName nvarchar The name of the database in which the user statement is running. 35 Yes DBUserName nvarchar The broker instance identifier that this message is from. 40 No Error int The message id number in sys.messages for the text in the event. 31 No EventClass int The type of event class captured. Always 191 for Broker:Forwarded Message Dropped. 27 No EventSequence int Sequence number for this event. 51 No FileName nvarchar The name of the service that the message is to. 36 No GUID uniqueidentifier The conversation id of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int The number of hops remaining for the forwarded message. 24 No IntegerData int The fragment number of the forwarded message. 25 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectId int The time to live value of the forwarded message. 22 No ObjectName nvarchar Message ID of the forwarded message. 34 No OwnerName nvarchar The broker instance identifier for the destination of the message. 37 No RoleName nvarchar The role of the conversation handle. One of: 38 No -Initiator. This broker initiated the conversation. -Target. This broker is the target of the conversation. ServerName nvarchar The name of the instance of SQL Server being traced. 26 No Severity int Severity number for the text in the event. 29 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced. 30 No Success int The amount of time that the message has been alive. When this value is greater than or equal to the time to live, the message is dropped. 23 No TargetLoginName nvarchar The network address that the message would have been forwarded to. 42 No TargetUserName nvarchar The name of the initiating service for the message. 39 No TextData ntext Description of the reason that SQL Server dropped the message. 1 Yes Transaction ID bigint The system-assigned ID of the transaction. 4 No The TextData column of this event contains a description of the reason that SQL Server dropped the message. See Also SQL Server Service Broker Broker:Message Classify Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Broker:Message Classify event when Service Broker determines the routing for a message. Broker:Message Classify Event Class Data Columns DATA COLUMN DATA TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN DATA TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventClass int The type of event class captured. Always 141 for Broker:Message Classify. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values. 21 Yes Local: The route chosen has the address LOCAL. Remote: The route chosen has an address other than LOCAL. Delayed: The message is delayed, either because forwarding is disabled or because there is no matching route present. FileName nvarchar The service name that the message is directed to. 36 No GUID uniqueidentifier The conversation id of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN DATA TYPE DESCRIPTION COLUMN NUMBER FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes OwnerName nvarchar The broker identifier that the message is directed to. 37 No RoleName nvarchar Indicates whether the message was received from the network, or originated in this SQL Server instance. 38 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes Start Time datetime The time at which the event started, when available. 14 Yes TargetUserName nvarchar The network address of the next hop broker. 39 No TransactionID bigint The system-assigned ID of the transaction. 4 No See Also SQL Server Service Broker Broker:Message Drop Event Class 3/24/2017 • 3 min to read • Edit Online SQL Server generates a Broker:Message Drop event when Service Broker is unable to retain a received message that should have been delivered to a service in this instance. For messages that should have been forwarded, see Broker:Forwarded Message Dropped Event Class. Broker:Message Drop Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Application Name nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint The sequence number of the dropped message. 52 No BigintData2 bigint The sequence number of the last message successfully acknowledged. 53 No ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes Error int The message id number in sys.messages for the text in the event. 31 No EventClass int The type of event class captured. Always 160 for Broker:MessageDro p. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar Indicates whether the dropped message was a sequenced message. One of two values: 21 Yes Sequenced Message. The dropped message was a sequenced message. Unsequenced Message. The dropped message was not a sequenced message. DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE GUID uniqueidentifier The conversation ID of the conversation that the dropped message belongs to. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The fragment number of the dropped message. 25 No IntegerData2 int The message fragment number that the dropped message was acknowledging. 55 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginName nvarchar The name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username). 11 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The conversation handle of the dialog. 34 No RoleName nvarchar The role of the conversation handle. This is either initiator or target. 38 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No Severity int Severity number for the text in the event. 29 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced.. 30 No TextData ntext The reason that SQL Server dropped the message. 1 Yes TransactionID bigint The system-assigned ID of the transaction. 4 No See Also SQL Server Service Broker Broker:Remote Message Ack Event Class 3/24/2017 • 3 min to read • Edit Online SQL Server generates a Broker:Remote Message Ack event when Service Broker sends or receives a message acknowledgement. Broker:Remote Message Ack Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values that are passed by the application, instead of the displayed name of the program. 10 Yes BigintData1 bigint The sequence number of the message that contains the acknowledgement. 52 No BigintData2 bigint The sequence number of the message that is being acknowledged. 53 No ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseID int The ID of the database that is specified by the USE database statement. If no USE database statement has been issued for a given instance, the ID of the default database. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int The type of event class captured. Always 149 for Broker:Message Ack. 27 No EventSequence int Sequence number for this event. 51 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSubClass nvarchar The type of event subclass, providing more information about each event class. This column can contain the following values: 21 Yes Message With Acknowledgement Sent: Service Broker sent an acknowledgement as part of a normal sequenced message. Acknowledgement Sent: Service Broker sent an acknowledgement outside a normal sequenced message. Message With Acknowledgement Received: Service Broker received an acknowledgement as part of a normal sequenced message. Acknowledgement Received: Service Broker received an acknowledgement outside a sequenced message. GUID uniqueidentifier The conversation ID of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HonorBrokerPriorit y Int The current value of the database HONOR_BROKER_PRI ORITY option: 0 = OFF, 1 = ON. 32 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The fragment number of the message that contains the acknowledgement. 25 No IntegerData2 int The fragment number of the message being acknowledged. 55 No IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes Priority int The priority level of the conversation. 5 Yes RoleName nvarchar The role of the instance that is acknowledging the message. This is either initiator or target. 38 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ServerName nvarchar The name of the instance of SQL Server that is being traced. 26 No SPID int The server process ID assigned by SQL Server to the process that is associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes StarvationElevation int The message was sent with a higher priority than the priority that was configured for the conversation: 0 = false, 1 = true. 33 Yes TransactionID bigint The system-assigned ID of the transaction. 4 No Cursors Event Category 3/24/2017 • 1 min to read • Edit Online The Cursors event category contains event classes that are used to monitor the behavior of cursors. In This Section TOPIC DESCRIPTION CursorClose Event Class Describes cursor close events that occur in application programming interface (API) cursors. CursorExecute Event Class Describes cursor execute events that occur in API cursors. CursorImplicitConversion Event Class Describes cursor implicit conversion events that occur in API or Transact-SQL cursors. CursorOpen Event Class Describes cursor open events that occur in API cursors. CursorPrepare Event Class Describes cursor prepare events that occur in API cursors. CursorRecompile Event Class Describes cursor recompile events that occur in API cursors. CursorUnprepare Event Class Describes cursor unprepare events that occur in API cursors. See Also Extended Events CursorClose Event Class 3/24/2017 • 2 min to read • Edit Online Cursor close events occur when the Database Engine closes and deallocates a cursor. The CursorClose event class describes cursor close events that occur in application programming interface (API) cursors. This event class occurs when a Transact-SQL cursor statement by ODBC, OLE DB, or DB-Library is closed. Include the CursorClose event class in traces that are recording the performance of cursors. The amount of overhead incurred depends on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace can significantly impede performance. CursorClose Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 78. 27 No EventSequence int Sequence of CursorClose event class in the batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the object referenced in the event. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName Nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identification that closed the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) CursorExecute Event Class 3/24/2017 • 2 min to read • Edit Online The CursorExecute event class describes cursor execute events that occur in application programming interface (API) cursors. Cursor execute events occur when Microsoft Database Engine creates and populates a cursor from the execution plan created by a cursor prepare event. Include the CursorExecute event class in traces that are recording the performance of cursors. When the CursorExecute event class is included in a trace, the amount of overhead incurred will depend on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace may significantly impede performance. CursorExecute Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 74. 27 No EventSequence int Sequence of CursorExecute event class in batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Integer used by ODBC, OLE DB or DB-Library to coordinate execution with the server. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData int Cursor type. Values are: 25 No 1 = Keyset 2 = Dynamic 4 = Forward only 8 = Static 16 = Fast forward IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identification that executed the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Cursors CursorImplicitConversion Event Class 3/24/2017 • 3 min to read • Edit Online The CursorImplicitConversion event class describes cursor-implicit conversion events that occur in application programming interfaces (APIs) or Transact-SQL cursors. Cursor implicit conversion events occur when the SQL Server Database Engine executes a Transact-SQL statement that is not supported by server cursors of the type requested. The Database Engine returns an error that indicates the cursor type has changed. Include the CursorImplicitConversion event class in traces that are recording the performance of cursors. When this event class is included in a trace, the amount of overhead incurred depends on how frequently cursors that require implicit conversion are used against the database during the trace. If cursors are used extensively, the trace may significantly impede performance. CursorImplicitConversion Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Resulting cursor type. Values are: 2 Yes 9 Yes 1 = Keyset 2 = Dynamic 4 = Forward only 8 = Static 16 = Fast forward ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 76. 27 No EventSequence int Sequence of the CursorClose event class in the batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the object referenced in the event. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData int Requested cursor type. Values are: 25 No 1 = Keyset 2 = Dynamic 4 = Forward only 8 = Static 16 = Fast forward IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identifier of the implicit conversion. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) CursorOpen Event Class 3/24/2017 • 2 min to read • Edit Online The CursorOpen event class describes cursor open events that occur in application programming interface (API) cursors. Cursor open events occur when the SQL Server Database Engine defines the SQL statement to be associated with the cursor and the cursor options, and then populates the cursor. Include the CursorOpen event class in traces that are recording the performance of cursors. When the CursorOpen event class is included in a trace, the amount of overhead incurred depends on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace may significantly impede performance. CursorOpen Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 53. 27 No EventSequence int Sequence of the CursorOpen event class in the batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Integer used by ODBC, OLE DB, or DB-Library to coordinate execution with the server. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData int Cursor type. Values are: 25 Yes 1 = Keyset 2 = Dynamic 4 = Forward only 8 = Static 16 = Fast forward IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identifier that opened the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint A token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Cursors CursorPrepare Event Class 3/24/2017 • 2 min to read • Edit Online The CursorPrepare event class describes cursor prepare events that occur in application programming interface (API) cursors. Cursor prepare events occur when the Microsoft Database Engine compiles a SELECT statement associated with a cursor into an execution plan but does not create the cursor. Include the CursorPrepare event class in traces that are recording the performance of cursors. When the CursorPrepare event class is included in a trace, the amount of overhead incurred will depend on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace may significantly impede performance. CursorPrepare Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 70. 27 No EventSequence int Sequence of CursorPrepare event class in batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the event class. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 No NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identification that prepared the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Cursors CursorRecompile Event Class 3/24/2017 • 2 min to read • Edit Online The CursorRecompile event class describes cursor recompile events that occur in application programming interface (API) cursors. Cursor recompile events occur when the Microsoft Database Engine recompiles a TransactSQL cursor due to a schema change. Include the CursorRecompile event class in traces that record the performance of cursors. When the CursorRecompile event class is included in a trace, the amount of overhead incurred depends on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace may significantly impede performance. CursorRecompile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 75. 27 No EventSequence int Sequence of CursorRecompile event class in batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identifier that recompiled the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) CursorUnprepare Event Class 3/24/2017 • 2 min to read • Edit Online The CursorUnprepare event class provides information about cursor unprepare events that occur in application programming interface (API) cursors. Cursor unprepare events occur when the Microsoft Database Engine discards an execution plan. Include the CursorUnprepare event class in traces that record the performance of cursors. When the CursorUnprepare event class is included in a trace, the amount of overhead incurred depends on how frequently cursors are used against the database during the trace. If cursors are used extensively, the trace can significantly impede performance. CursorUnprepare Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than with the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE statement or the default database if no USE statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event recorded = 77. 27 No EventSequence int Batch sequence of the CursorUnprepare event class. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle Int Identifies the prepared handle that is being unprepared. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identification that unprepared the cursor. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) CLR Event Category 3/24/2017 • 2 min to read • Edit Online The CLR event category includes event classes that are produced by the execution of .NET Framework common language runtime (CLR) objects inside SQL Server. Assembly Load Event Class The Assembly Load event class occurs when a request to load an assembly is executed. Include the Assembly Load event class in traces where you want to monitor assembly loads. This can be useful when troubleshooting a query that uses common language runtime (CLR), when troubleshooting a slow running server that is running CLR queries, or when monitoring a server to gather user, database, success, or other information about assembly loads. Assembly Load Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar The name of the application that requested the load. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int Assembly ID. 22 Yes ObjectName nvarchar Fully qualified name of the assembly. 34 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int Indicates whether the assembly load succeeded (1) or failed (0). 23 Yes TextData ntext "Assembly Load Succeeded" if the load succeeds; otherwise, "Assembly Load Failed". 1 Yes See Also Extended Events Assemblies (Database Engine) See Also Extended Events Database Event Category 3/24/2017 • 1 min to read • Edit Online The Database event category contains event classes to monitor the SQL Server Database Engine. In This Section TOPIC DESCRIPTION Data File Auto Grow Event Class Indicates that the data file grew automatically. This event is not triggered if the data file is grown explicitly through ALTER DATABASE. Data File Auto Shrink Event Class Indicates that the data file has been shrunk. Database Mirroring Connection Event Class An event generated to report the status of a transport connection for database mirroring. Database Mirroring State Change Event Class Indicates when the state of a mirrored database changes. Database Suspect Data Page Event Class Indicates when a page is added to the suspect_pages table in the msdb database. Log File Auto Grow Event Class Indicates that the log file grew automatically. This event is not triggered if the log file is grown explicitly through ALTER DATABASE. Log File Auto Shrink Event Class Indicates that the log file grew automatically. This event is not triggered if the log file shrinks explicitly through ALTER DATABASE. See Also Extended Events Data File Auto Grow Event Class 3/24/2017 • 2 min to read • Edit Online The Data File Auto Grow event class indicates that the data file grew automatically. This event is not triggered if the data file is grown explicitly by using the ALTER DATABASE statement. Include the Data File Auto Grow event class in traces that are monitoring growth of the data file. When the Data File Auto Grow event class is included in a trace, the amount of overhead incurred is low unless the data file is growing automatically frequently. Data File Auto Grow Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time (in milliseconds) necessary to extend the file. 13 Yes EndTime datetime Time that the data file auto grow ended. 18 Yes EventClass int Type of event = 92. 27 No EventSequence int Sequence of the CursorClose event class in the batch. 51 No Filename nvarchar Logical name of the file being extended. 36 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Number of 8-kilobyte (KB) pages by which the file increased. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Microsoft Windows domain to which the user belongs. 7 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID Int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes See Also sp_trace_setevent (Transact-SQL) Data File Auto Shrink Event Class 3/24/2017 • 2 min to read • Edit Online The Data File Auto Shrink event class indicates that the data file has been shrunk. This event is not triggered if the data file shrinks because of an explicit ALTER DATABASE statement. Include the Data File Auto Shrink event class in traces that monitor the data file size changes. When the Data File Auto Shrink event class is included in a trace, the amount of overhead incurred is low unless the data file frequently shrinks. Data File Auto Shrink Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID Int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Time (in milliseconds) to shrink the file. 13 Yes EndTime datetime Time that the auto shrink ended. 18 Yes EventClass int Type of event recorded = 94. 27 No EventSequence int Sequence of event class in batch. 51 No Filename nvarchar Logical name of the file being shrunk. 36 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Number of 8-KB pages by which the file was reduced. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Database Mirroring Connection Event Class 3/24/2017 • 2 min to read • Edit Online SQL Server generates a Database Mirroring Connection event to report the status of a transport connection managed by Database Mirroring. Database Mirroring:Connection Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Error int The message ID number in sys.messages for the text in the event. If this event reports an error, this is the SQL Server error number. 31 No EventClass int The type of event class captured. Always 151 for Database Mirroring Connection. 27 No EventSequence int Sequence number for this event. 51 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSubClass nvarchar The connection state of this connection. For this event, the subclass is one the following values: 21 Yes Connecting. SQL Server is initiating a transport connection. Connected. SQL Server has established a transport connection. Connect Failed. SQL Server failed to establish a transport connection. Closing. SQL Server is closing the transport connection. Closed. SQL Server has closed the transport connection. Accept. SQL Server has accepted a transport connection from another instance. Send IO Error. SQL Server encountered a transport error while sending a message. Receive IO Error. SQL Server encountered a transport error while receiving a message. GUID uniqueidentifier The endpoint ID of this connection. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE IntegerData int The number of times this connection has been closed. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The conversation handle of the dialog. 34 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes TextData ntext The text of the error message related to the event. For events that do not report an error, this field is empty. The error message may either be a SQL Server error message or a Windows error message. 1 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TransactionID bigint The system-assigned ID of the transaction. 4 No Database Mirroring State Change Event Class 3/24/2017 • 2 min to read • Edit Online The Database Mirroring State Change event class indicates when the state of a mirrored database changes. Include this event class in traces that are monitoring conditions of mirrored databases. When the Database Mirroring State Change event class is included in a trace the relative overhead is low. The overhead may be greater if the state of the mirrored databases increase. Data Database Mirroring State Change Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the mirrored database. 35 Yes EventClass int Type of event = 167. 27 No EventSequence int Sequence of event class in batch. 51 No IntegerData int Prior state ID. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of Microsoft SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE State int New mirroring state ID: 30 Yes 0 = Null Notification 1 = Synchronized Principal with Witness 2 = Synchronized Principal without Witness 3 = Synchronized Mirror with Witness 4 = Synchronized Mirror without Witness 5 = Connection with Principal Lost 6 = Connection with Mirror Lost 7 = Manual Failover 8 = Automatic Failover 9 = Mirroring Suspended 10 = No Quorum 11 = Synchronizing Mirror 12 = Principal Running Exposed TextData ntext Description of the state change. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Log File Auto Grow Event Class 3/24/2017 • 2 min to read • Edit Online The Log File Auto Grow event class indicates that the log file grew automatically. This event is not triggered if the log file is grown explicitly through ALTER DATABASE. Include the Log File Auto Grow event class in traces that are monitoring the log file growth. When this event class is included in a trace the amount of overhead incurred will be low unless the log file is growing automatically frequently. Log File Auto Grow Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID Int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time (in milliseconds) necessary to extend the file. 13 Yes EndTime datetime Time that the log file auto grow ended. 18 Yes EventClass int Type of event = 93. 27 No EventSequence int Sequence of CursorClose event class in batch. 51 No Filename nvarchar Logical name of the file being extended. 36 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData Int Number of 8-kilobyte (KB) pages by which the file increased. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID Int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) ALTER DATABASE (Transact-SQL) Log File Auto Shrink Event Class 3/24/2017 • 2 min to read • Edit Online The Log File Auto Shrink event class indicates that the log file shrank automatically. This event is not triggered if the log file shrinks because of an explicit ALTER DATABASE statement. Include the Log File Auto Shrink event class in traces that monitor the shrinking of the log file. When thisevent class is included in a trace the amount of overhead incurred will be low unless the file frequently shrinks. Log File Auto Shrink Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID Int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time (in milliseconds) necessary to extend the file. 13 Yes EndTime datetime Time that the log file Auto Shrink ended. 18 Yes EventClass int Type of event = 95. 27 No EventSequence int Sequence of the CursorClose event class in the batch. 51 No Filename nvarchar Logical name of the file being extended. 36 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData Int Number of 8-kilobyte (KB) pages by which the file increased. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID Int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes See Also sp_trace_setevent (Transact-SQL) Deprecation Event Category 3/24/2017 • 1 min to read • Edit Online The Deprecation event category contains general deprecation events. In This Section TOPIC DESCRIPTION Deprecation Announcement Event Class Indicates that a feature will be removed in a future version of SQL Server. Deprecation Final Support Event Class Indicates that a feature will be removed in the next major release of SQL Server. Deprecation Announcement Event Class 3/24/2017 • 2 min to read • Edit Online The Deprecation Announcement event class occurs when you use a feature that will be removed from a future version of SQL Server, but will not be removed from the next major release. For greatest longevity of your applications, avoid using features that cause the Deprecation Announcement event class or the Deprecation Final Support event class. Deprecation Announcement Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 125. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int ID number of the deprecated feature. 22 Yes ObjectName nvarchar Name of the deprecated feature. 34 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image Binary handle that can be used to identify SQL batches or stored procedures. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Deprecation Final Support Event Class Deprecated Database Engine Features in SQL Server 2016 Deprecation Final Support Event Class 3/24/2017 • 2 min to read • Edit Online The Deprecation Final Support event class occurs when you use a feature that will be removed from the next major release of SQL Server. For greatest longevity of your applications, do not use features that cause the Deprecation Final Support event class or the Deprecation Announcement event class. Modify applications that use final deprecation features as soon as possible. Deprecation Final Support Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 126. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes ObjectID int ID number of the deprecated feature. 22 Yes ObjectName nvarchar Name of the deprecated feature. 34 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column will display both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image Binary handle that can be used to identify SQL batches or stored procedures. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Deprecation Announcement Event Class Deprecated Database Engine Features in SQL Server 2016 Errors and Warnings Event Category (Database Engine) 3/24/2017 • 1 min to read • Edit Online The Errors and Warnings event category contains general error and warning events. In This Section TOPIC DESCRIPTION Attention Event Class Indicates that an Attention event has occurred. Background Job Error Event Class Indicates that a background job has terminated abnormally. Bitmap Warning Event Class Indicates that bitmap filtering has been disabled in a query. Blocked Process Report Event Class Indicates that a task has been blocked for more than a specified amount of time. CPU Threshold Exceeded Event Class Indicates that the Resource Governor detects a query that exceeds the specified CPU threshold. ErrorLog Event Class Indicates that error events have been logged in the SQL Server error log. EventLog Event Class Indicates that events have been logged in the Windows event log. Exception Event Class Indicates that an exception has occurred in SQL Server. Exchange Spill Event Class Indicates that communication buffers in a parallel query plan have been written to the tempdb database. Execution Warnings Event Class Indicates that memory grant warnings occurred during the execution of a SQL Server statement or stored procedure. Hash Warning Event Class Indicates that a hash recursion or hash bailout has occurred during a hashing operation. Missing Column Statistics Event Class Indicates that column statistics that could have been useful for the optimizer are not available. Missing Join Predicate Event Class Indicates that a query is being executed that has no join predicate. Sort Warnings Event Class Indicates that sort operations do not fit into memory. User Error Message Event Class Displays error messages that are seen by the user. See Also sp_trace_setevent (Transact-SQL) Attention Event Class 3/24/2017 • 2 min to read • Edit Online The Attention event class indicates that an attention event, such as cancel, client-interrupt requests, or broken client connections, has occurred. Cancel operations can also be seen as part of implementing data access driver time-outs. Attention Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime End time of the interrupted action. 15 Yes EventClass int Type of event = 16. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events Background Job Error Event Class 3/24/2017 • 1 min to read • Edit Online The Background Job Error event class occurs when a background job has terminated abnormally. This condition might require the attention of a system administrator. Background Job Error Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by job. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Error int Error number of the last attempt (EventSubClass 1 only). 31 Yes EventClass int Type of event = 193. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 24 Yes 1 = Background job giving up after failure. 2 = Background job dropped - queue is full. 3 = Background job returned an error. IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the indid column of the sysindexes system table. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData int Number of tries attempted by the job (EventSubClass 1 only). 25 Yes IntegerData2 int Job sequence number. 55 Yes ObjectID int System-assigned ID of the object. 22 Yes SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Microsoft Windows logins. 64 Yes Severity int Severity level of the error on the last attempt (EventSubClass 1 only). 20 Yes StartTime datetime Time at which the job was created. 14 Yes State int State of the error on the last attempt (EventSubClass 1 only). 30 Yes TextData ntext Text description of the event subclass value. 1 Yes Type int Type of job. 57 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Auto Stats Event Class Bitmap Warning Event Class 3/24/2017 • 2 min to read • Edit Online The Bitmap Warning event class can be used to monitor bitmap filter usage in queries. The event subclass can be used to report when bitmap filters have been disabled in a query. Bitmap Warning Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int Identifier of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 212. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 0 = bitmap filter is disabled. 21 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int Node ID of the root of the hash team involved in the repartition. Corresponds with the Node ID in Showplan. 22 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time that the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes Blocked Process Report Event Class 3/24/2017 • 2 min to read • Edit Online The Blocked Process Report event class indicates that a task has been blocked for more than a specified amount of time. This event class does not include system tasks or tasks that are waiting on non deadlock-detectable resources. To configure the threshold and frequency at which reports are generated, use the sp_configure command to configure the blocked process threshold option, which can be set in seconds. By default, no blocked process reports are produced. For more information about setting the blocked process threshold option, see blocked process threshold Server Configuration Option. For information about filtering the data returned by the Blocked Process Report event class, see Filter Events in a Trace (SQL Server Profiler), Set a Trace Filter (Transact-SQL), or sp_trace_setfilter (Transact-SQL). Blocked Process Report Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the lock was acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes Duration bigint The amount of time (in milliseconds) that the process was blocked. 13 Yes EndTime datetime Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting. 15 Yes EventClass int Type of event = 137. 27 No EventSequence int The sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the indid column of the sysindexes system table. 24 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginSid image Security identifier (SID) of the logged-in user. This event is always reported from the system thread. IsSystem = 1; SID = sa. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Mode int The state the event has received or is requesting. 32 Yes Yes 0=NULL 1=Sch-S 2=Sch-M 3=S 4=U 5=X 6=IS 7=IU 8=IX 9=SIU 10=SIX 11=UIX 12=BU 13=RangeS-S 14=RangeS-U 15=RangeI-N 16=RangeI-S 17=RangeI-U 18=RangeI-X 19=RangeX-S 20=RangeX-U 21=RangeX-X ObjectID int System-assigned ID of the object on which the lock was acquired, if available and applicable. 22 ServerName nvarchar Name of the instance of SQL Server being traced. 26 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar The login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1; and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) sp_configure (Transact-SQL) CPU Threshold Exceeded Event Class 3/24/2017 • 1 min to read • Edit Online The CPU Threshold Exceeded event class indicates that Resource Governor detects a query that exceeds the CPU threshold specified for REQUEST_MAX_CPU_TIME_SEC. NOTE The detection interval for this event is five seconds. It is guaranteed that an event will be generated if a query exceeds the specified limit by at least five seconds. However, if a query exceeds the specified threshold by less than five seconds, its detection might be missed depending on the timing of the query and the time of last detection sweep. CPU Threshold Exceeded Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE CPU int CPU usage in milliseconds. 18 Yes EventClass int 214 27 No EventSubClass int CPU limit violation. 21 Yes GroupID int Group ID where the violation occurred. 66 Yes OwnerID int SPID of the process that caused the violation. 58 Yes SPID int ID of the server process that fires this event. 12 Yes 14 Yes Note: This can differ from the actual user SPID if a system thread validates CPU usage as a background task. StartTime datetime See Also sp_trace_setevent (Transact-SQL) The time when this event fired. Database Suspect Data Page Event Class 3/24/2017 • 1 min to read • Edit Online The Database Suspect Data Page event class indicates when a page is added to the suspect_pages table in msdb. Include this event class in traces that are monitoring the occurrence of suspect pages. NOTE This event is issued asynchronously from the insertion of a corresponding row into the suspect_pages table. Therefore, a job listening on this event might not find the corresponding suspect_pages entry immediately. When the Database Suspect Data Page event class is included in a trace the relative overhead is low. The overhead might be greater if the number of suspect pages increases, for example, if a disk drive is experiencing problems. Database Suspect Data Page Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database for which the suspect page event has been raised. This is the same as the database_id column of the suspect_pages table. 3 Yes EventClass int The type of the event is 213. 27 No EventSequence int Sequence of event class in batch. 51 No SPID int ID of the SQL Server task that encountered the suspect page. 12 Yes StartTime datetime Time that the event occurred. 14 Yes ObjectID int ID of the database file that contains the suspect page. This is the same as the file_id column of the suspect_pages table. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID2 int ID of the suspect page in the file. This is the same as the page_id column of the suspect_pages table. 56 Yes Error int Type of error that was encountered . This value is the same as the event_type value for the page in the suspect_pages table. 31 Yes See Also sp_trace_setevent (Transact-SQL) Manage the suspect_pages Table (SQL Server) ErrorLog Event Class 3/24/2017 • 2 min to read • Edit Online The ErrorLog event class indicates that messages have been logged in the SQL Server error log. ErrorLog Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 22. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes Severity int Severity level of an exception. 20 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the error message. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) EventLog Event Class 3/24/2017 • 2 min to read • Edit Online The EventLogevent class indicates that events have been logged in the Microsoft Windows event log. EventLog Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Error int Error number of a given event, if available. 31 Yes EventClass int Type of event = 21. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes Severity int Severity level of an exception. 20 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the error message, if available. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Exception Event Class 3/24/2017 • 2 min to read • Edit Online The Exception event class indicates that an exception has occurred in SQL Server. Exception Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Error int Error number of the event. 31 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 33. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes Severity int Severity level of an exception. 20 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes State int State of the server. 30 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Exchange Spill Event Class 4/6/2017 • 4 min to read • Edit Online The Exchange Spill event class indicates that communication buffers in a parallel query plan have been temporarily written to the tempdb database. This occurs rarely and only when a query plan has multiple range scans. Normally, the Transact-SQL query that generates such range scans has many BETWEEN operators, each of which selects a range of rows from a table or an index. Alternatively, you can obtain multiple ranges using expressions such as (T.a > 10 AND T.a < 20) OR (T.a > 100 AND T.a < 120). Additionally, the query plans must require that these ranges be scanned in order either because there is an ORDER BY clause on T.a, or because an iterator within the plan requires that it consume the tuples in sorted order. When a query plan for such a query has multiple Parallelism operators, the memory communication buffers used by the Parallelism operators become full, and a situation can arise whereby the query's execution progress stops. In this situation, one of the Parallelism operators writes its output buffer to tempdb (an operation called an exchange spill) so that it can consume rows from some of its input buffers. Eventually, the spilled rows are returned to the consumer when the consumer is ready to consume them. Very rarely, multiple exchange spills can occur within the same execution plan, causing the query to execute slowly. If you notice more than five spills within the same query plan's execution, contact your support professional. Exchange spills are sometimes transient and may disappear as data distribution changes. There are several ways to avoid exchange spill events: Omit the ORDER BY clause if you do not need the result set to be ordered. If ORDER BY is required, eliminate the column that participates in the multiple range scans (T.a in the example above) from the ORDER BY clause. Using an index hint, force the optimizer to use a different access path on the table in question. Rewrite the query to produce a different query execution plan. Force serial execution of the query by adding the MAXDOP = 1 option to the end of the query or index operation. For more information, see Configure the max degree of parallelism Server Configuration Option and Configure Parallel Index Operations. IMPORTANT To determine where the Exchange Spill event is occurring when the query optimizer generates an execution plan, you should also collect a Showplan event class in the trace. You can choose any of the Showplan event classes except the Showplan Text and Showplan Text (Unencoded) event classes, which do not return a Node ID. Node IDs in Showplans identify each operation the query optimizer performs when it generates a query execution plan. These operations are called operators and each operator in a Showplan has a Node ID. The ObjectID column for Exchange Spill events corresponds to the Node ID in Showplans so you can determine which operator, or operation, is causing the error. Exchange Spill Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 127. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Spill begin 2=Spill end DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of <DOMAIN>\). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the syslogins table of the master database. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. Corresponds with the Node ID in Showplans. 22 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Set Index Options ALTER INDEX (Transact-SQL) Execution Warnings Event Class 3/24/2017 • 2 min to read • Edit Online The Execution Warnings event class indicates memory grant warnings that occurred during the execution of a SQL Server statement or stored procedure. This event class can be monitored to determine if queries had to wait one second or more for memory before proceeding, or if the initial attempt to get memory failed. Information about query wait periods can help uncover contention issues in the system that can affect performance. Execution Warnings Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Time (in milliseconds) that the query had to wait to get the required memory. Valid only when EventSubClass = 1 (Query wait). 13 Yes Error int Not used. 31 Yes EventClass int Type of event = 67. 27 No EventSequence int Sequence of a given event in the trace. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Query wait 2=Query timeout GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, NULL = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server that is being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Hash Warning Event Class 3/24/2017 • 4 min to read • Edit Online The Hash Warning event class can be used to monitor when a hash recursion or cessation of hashing (hash bailout) has occurred during a hashing operation. Hash recursion occurs when the build input does not fit into available memory, resulting in the split of input into multiple partitions that are processed separately. If any of these partitions still do not fit into available memory, it is split into subpartitions, which are also processed separately. This splitting process continues until each partition fits into available memory or until the maximum recursion level is reached (displayed in the IntegerData data column). Hash bailout occurs when a hashing operation reaches its maximum recursion level and shifts to an alternate plan to process the remaining partitioned data. Hash bailout usually occurs because of skewed data. Hash recursion and hash bailout cause reduced performance in your server. To eliminate or reduce the frequency of hash recursion and bailouts, do one of the following: Make sure that statistics exist on the columns that are being joined or grouped. If statistics exist on the columns, update them. Use a different type of join. For example, use a MERGE or LOOP join instead, if appropriate. Increase available memory on the computer. Hash recursion or bailout occurs when there is not enough memory to process queries in place and they need to spill to disk. Creating or updating the statistics on the column involved in the join is the most effective way to reduce the number of hash recursion or bailouts that occur. NOTE The terms grace hash join and recursive hash join are also used to describe hash bailout. IMPORTANT To determine where the Hash Warning event is occurring when the query optimizer generates an execution plan, you should also collect a Showplan event class in the trace. You can choose any of the Showplan event classes except the Showplan Text and Showplan Text (Unencoded) event classes, which do not return a Node ID. Node IDs in Showplans identify each operation the query optimizer performs when it generates a query execution plan. These operations are called operators, and each operator in a Showplan has a Node ID. The ObjectID column for Hash Warning events corresponds to the Node ID in Showplans so you can determine which operator, or operation, is causing the error. Hash Warning Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than with the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides a client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 55. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 0=Recursion 1=Bailout DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Recursion level (hash recursion only). 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of <DOMAIN>\). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int Node ID of the root of the hash team involved in the repartition. Corresponds with the Node ID in Showplans. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request that contains the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server that is being traced. 26 SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Missing Column Statistics Event Class 3/24/2017 • 2 min to read • Edit Online The Missing Column Statistics event class indicates that column statistics that could have been useful for the optimizer are not available. By monitoring the Missing Column Statistics event class, you can determine if there are statistics missing for a column used by a query. This can cause the optimizer to choose a less efficient query plan than expected. Missing Column Statistics Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event=79. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext List of the columns with missing statistics. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) CREATE STATISTICS (Transact-SQL) Monitor and Respond to Events Missing Join Predicate Event Class 3/24/2017 • 2 min to read • Edit Online The Missing Join Predicate event class indicates that a query is being executed that has no join predicate. This could result in a long-running query. For more information on join predicates, see Predicates (Transact-SQL). Missing Join Predicate Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 80. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SQL Server Profiler Sort Warnings Event Class 3/24/2017 • 3 min to read • Edit Online The Sort Warnings event class indicates that sort operations do not fit into memory. This does not include sort operations involving the creation of indexes, only sort operations within a query (such as an ORDER BY clause used in a SELECT statement). If a query involving a sort operation generates a Sort Warnings event class with an EventSubClass data column value of 2, the performance of the query can be affected because multiple passes over the data are required to sort the data. Investigate the query further to determine if the sort operation can be eliminated. Sort Warnings Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 69. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1 = Single pass. When the sort table was written to disk, only a single additional pass over the data was required to obtain sorted output. 2 = Multiple pass. When the sort table was written to disk, multiple passes over the data were required to obtain sorted output. GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, NULL = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) User Error Message Event Class 3/24/2017 • 2 min to read • Edit Online The User Error Message event class displays the error message as seen by the user in the case of an error or exception. The error message text appears in the TextData field. User Error Message Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 162. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes Severity int Severity level of the error or exception. 20 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes State int Equivalent to an error state code. 30 Yes TextData ntext Text of the error message or exception. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Full Text Event Category 3/24/2017 • 1 min to read • Edit Online The Full Text event category contains general full-text events. In This Section TOPIC DESCRIPTION FT:Crawl Aborted Event Class Indicates that a full-text crawl has encountered an exception. FT:Crawl Started Event Class Indicates that a full-text crawl has started. FT:Crawl Stopped Event Class Indicates that a full-text crawl has stopped. FT:Crawl Aborted Event Class 3/24/2017 • 1 min to read • Edit Online The FT:Crawl Aborted event class indicates that an exception has been encountered during a full-text crawl. The error usually causes the full-text crawl to stop. Check the Microsoft Windows event log or the crawl log for more detailed error information. FT:Crawl Aborted Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the full-text crawl is running. Determine the value for a database by using the DB_ID function. 3 Yes Error int Error number of a given event. Often this is the error number stored in the sysmessages table. 31 Yes EventClass int Type of event = 157. 27 No EventSequence int Sequence of a given event within the request. 51 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes ObjectID int System-assigned ID of the object on which the full-text crawl is running when the failure occurs. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes State int Equivalent to an error state code. 30 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) FT:Crawl Started Event Class 3/24/2017 • 1 min to read • Edit Online The FT:Crawl Started event class indicates that a full-text crawl (population) has started. Use this event class to check if a crawl request is actually being picked up by worker tasks. FT: Crawl Started Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the full-text crawl was started. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int Type of event = 155. 27 No EventSequence int Sequence of a given event within the request. 51 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes ObjectID int System-assigned ID of the object. The fulltext crawl was started on the full-text index on this object. 22 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Microsoft Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Full-text crawl type. The value can be Full, Incremental, Manual, or Auto. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) FT:Crawl Stopped Event Class 3/24/2017 • 1 min to read • Edit Online The :Crawl Stopped event class indicates that a full-text crawl (population) has stopped. The stop can be due to a successfully completed crawl or a fatal error. FT:Crawl Stopped Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the full-text crawl has stopped. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int Type of event = 156. 27 No EventSequence int Sequence of a given event within the request. 51 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes ObjectID int System-assigned ID of the object. The fulltext crawl has stopped for the fulltext index on this object. 22 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Microsoft Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) Locks Event Category 3/24/2017 • 1 min to read • Edit Online Use the event classes in the Locks event category to monitor locking activity in an instance of the Microsoft SQL Server Database Engine. These event classes can help you investigate locking problems caused by multiple users reading and modifying data concurrently. Because the Database Engine often processes many locks, capturing the Locks event classes during a trace can incur significant overhead and result in large trace files or tables. In This Section TOPIC DESCRIPTION Deadlock Graph Event Class Provides an XML description of a deadlock. Lock:Acquired Event Class Indicates that a lock has been acquired on a resource, such as a row in a table. Lock:Cancel Event Class Tracks requests for locks that were canceled before the lock was acquired (for example, to prevent a deadlock). Lock:Deadlock Chain Event Class Monitors when deadlock conditions occur and which objects are involved. Lock:Deadlock Event Class Tracks when a transaction has requested a lock on a resource already locked by another transaction, resulting in a deadlock. Lock:Escalation Event Class Indicates that a finer-grained lock has been converted to a coarser-grained lock. Lock:Released Event Class Tracks when a lock is released. Lock:Timeout (timeout > 0) Event Class Tracks when lock requests cannot be completed because another transaction has a blocking lock on the requested resource. This event occurs only in situations where the lock time-out value is greater than zero. Lock:Timeout Event Class Tracks when lock requests cannot be completed because another transaction has a blocking lock on the requested resource. Deadlock Graph Event Class 3/24/2017 • 1 min to read • Edit Online The Deadlock Graph event class provides an XML description of a deadlock. This class occurs simultaneously with the Lock:Deadlock event class. Deadlock Graph Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 148. 27 No EventSequence int Sequence of a given event within the request. 51 No IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. This value is always 1 for this event. 60 Yes LoginName nvarchar Name of the login of the user (either the Microsoft SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). This value is always the system user for this event. 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. This value is always the SID of the system user for this event. 41 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the deadlock was detected. 14 Yes TextData ntext XML description of the deadlock. 1 Yes TransactionID bigint Not used. 4 Yes See Also sp_trace_setevent (Transact-SQL) Lock:Deadlock Event Class Lock:Acquired Event Class 3/24/2017 • 4 min to read • Edit Online The Lock:Acquiredevent class indicates that acquisition of a lock on a resource, such as a data page, has been achieved. The Lock:Acquired and Lock:Released event classes can be used to monitor when objects are being locked, the type of locks taken, and for how long the locks were retained. Locks retained for long periods of time may cause contention issues and should be investigated. For example, an application can be acquiring locks on rows in a table, and then waiting for user input. Because the user input can take a long time to occur, the locks can block other users. In this instance, the application should be redesigned to make lock requests only when needed and not require user input when locks have been acquired. Lock:Acquired Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint Partition ID if the lock resource is partitioned. 52 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the lock was acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes Duration bigint Amount of time (in microseconds) between the time the lock request was issued and the time the lock was acquired. 13 Yes EndTime datetime Time at which the event ended. 15 Yes EventClass int Type of event = 24. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes Mode int Resulting mode after the lock was acquired. 32 Yes 0=NULL Compatible with all other lock modes (LCK_M_NL) 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) 10=Shared with Intent Exclusive (LCK_M_SIX) 11=Update with Intent Exclusive (LCK_M_UIX) (LCK_M_UIX) DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int ID of the object on which the lock was acquired, if available and applicable. 22 Yes ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPAC E RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the lock type that was acquired. This is the same value as the resource_description column in sys.dm_tran_locks. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_U NIT See Also Lock:Released Event Class sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Cancel Event Class 3/24/2017 • 3 min to read • Edit Online The Lock:Cancel event class indicates that acquisition of a lock on a resource has been canceled; for example, due to a query being canceled. Lock:Cancel Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the lock was acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the lock acquire was attempted. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Duration bigint Amount of time (in microseconds) between the time the lock request was issued and the time the lock was canceled. 13 Yes EndTime datetime Time at which the event ended. 15 Yes EventClass int Type of event = 26. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes Mode int The resulting mode after the lock was canceled. 32 Yes 0=NULL - Compatible with all other lock modes (LCK_M_NL) 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) 10=Shared with Intent Exclusive (LCK_M_SIX) 11=Update with Intent Exclusive (LCK_M_UIX) 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) DATA COLUMN NAME DATA TYPE 14=Key range DESCRIPTION Shared/Update (LCK_M_RS_U) COLUMN ID FILTERABLE 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int ID of the object on which the lock was canceled, if available and applicable. 22 Yes ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes OwnerID int 1=TRANSACTION 58 Yes 49 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPACE RequestID int ID of the request containing the statement. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Text value dependent on the lock type that was acquired. This is the same value as the resource_descriptio n column in sys.dm_tran_locks. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_UN IT See Also sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Deadlock Chain Event Class 3/24/2017 • 2 min to read • Edit Online The Lock:Deadlock Chain event class is produced for each participant in a deadlock. Use the Lock:Deadlock Chain event class to monitor when deadlock conditions occur. This information is useful to determine if deadlocks are significantly affecting the performance of your application, and which objects are involved. You can examine the application code that modifies these objects to determine if changes to minimize deadlocks can be made. Lock:Deadlock Chain Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BinaryData image Lock resource identifier. 2 Yes DatabaseID int ID of the database to which this resource belongs. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database to which the resource belongs. 35 Yes EventClass int Type of event = 59. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 101=Resource type Lock 102=Resource type Exchange DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData int Deadlock number. Numbers are assigned beginning with 0 when the server is started, and incremented for each deadlock. 25 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes Mode int 0=NULL - Compatible with all other lock modes (LCK_M_NL) 32 Yes 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent DATA COLUMN NAME DATA TYPE 9=Shared with intent to Update DESCRIPTION (LCK_M_SIU) COLUMN ID FILTERABLE 10=Shared with Intent Exclusive (LCK_M_SIX) 11=Update with Intent Exclusive (LCK_M_UIX) 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) ObjectID int ID of the object that was locked, if available and applicable. 22 Yes ObjectID2 bigint The ID of the related object or entity, if available and applicable. 56 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPACE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Microsoft Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the resource type. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_UN IT See Also sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Deadlock Event Class 3/24/2017 • 3 min to read • Edit Online The Lock:Deadlock event class is produced when an attempt to acquire a lock is canceled because the attempt was part of a deadlock and was chosen as the deadlock victim. Use the Lock:Deadlock event class to monitor when deadlocks occur and which objects are involved. You can use this information to determine if deadlocks are significantly affecting the performance of your application. You can then examine the application code to determine if you can make changes to minimize deadlocks. Lock:Deadlock Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database in which the lock was being acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the lock was being acquired. 35 Yes Duration bigint Amount of time (in microseconds) between the time the lock request was issued and the time the deadlock occurred. 13 Yes EndTime datetime Time at which the deadlock ended. 15 Yes EventClass int Type of event = 25. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Deadlock number. Numbers are assigned beginning with 0 when the server is started and are incremented for each deadlock. 25 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes Mode int The resulting mode after the deadlock. 32 Yes 0=NULL Compatible with all other lock modes (LCK_M_NL) 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) 10=Shared with Intent Exclusive (LCK_M_SIX) 11=Update with Intent Exclusive DATA COLUMN NAME DATA TYPE Intent Exclusive (LCK_M_UIX) DESCRIPTION COLUMN ID FILTERABLE 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int ID of the object in contention, if available and applicable. 22 Yes ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPAC E RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Text value dependent on the lock type that was being acquired. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_U NIT See Also sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Escalation Event Class 3/24/2017 • 5 min to read • Edit Online The Lock:Escalation event class indicates that a finer-grained lock has been converted to a coarser-grained lock; for example, a row lock that is converted to an object lock. The escalation event class is Event ID 60. Lock:Escalation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the lock was acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the escalation occurred. 35 Yes EventClass int Type of event = 60. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Cause of the lock escalation: 21 Yes 0LOCK_THRESHOLD indicates the statement exceeded the lock threshold. 1MEMORY_THRESHO LD indicates the statement exceeded the memory threshold. EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int HoBT lock count. The number of locks for the HoBT at the time of lock escalation. 25 Yes IntegerData2 int Escalated lock count. The total number of locks that were converted. These lock structures are deallocated because they are already covered by the escalated lock. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LineNumber int Line number of Transact-SQL statement. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes Mode int Resulting lock mode after the escalation: 32 Yes 0=NULL - Compatible with all other lock modes (LCK_M_NL) 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) 10=Shared with Intent Exclusive (LCK_M_SIX) (LCK_M_SIX) DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE 11=Update with Intent Exclusive (LCK_M_UIX) 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the table for which lock escalation was triggered. 22 Yes ObjectID2 bigint ID of the related object or entity. (HoBT ID for which the lock escalation was triggered.) 56 Yes Offset int Starting offset of Transact-SQL statement. 61 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPACE 6=WAITFOR_QUERY RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the TransactSQL statement that caused lock escalation. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int Lock escalation granularity: 57 Yes 1=NULL_RESOURCE 2=DATABASE 3=FILE 5=OBJECT (table level) 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=HOBT 13=ALLOCATION_UN IT Examples The following example uses the sp_trace_create procedure to create a trace, uses sp_trace_setevent to add lock escalation columns to the trace, and then uses sp_trace_setstatus to start the trace. In statements such as EXEC sp_trace_setevent @TraceID, 60, 22, 1 , the number 60 indicates the escalation event class, 22 indicates the ObjectID column, and 1 sets the trace event to ON. DECLARE @RC int, @TraceID int; EXEC @rc = sp_trace_create @TraceID output, 0, -- Set the events and data columns you need to EXEC sp_trace_setevent @TraceID, 60, 1, 1; -EXEC sp_trace_setevent @TraceID, 60, 12, 1; -EXEC sp_trace_setevent @TraceID, 60, 21, 1; -EXEC sp_trace_setevent @TraceID, 60, 22, 1; -EXEC sp_trace_setevent @TraceID, 60, 25, 1; -EXEC sp_trace_setevent @TraceID, 60, 55, 1; -EXEC sp_trace_setevent @TraceID, 60, 57, 1; --- Set any filter byusing sp_trace_setfilter. -- Start the trace. EXEC sp_trace_setstatus @TraceID, 1; GO N'C:\TraceResults'; capture. 1 = TextData 12 = SPID 21 = EventSubClass 22 = ObjectID 25 = IntegerData 25 = IntegerData2 57 = Type Now that the trace is running, execute the statements that you want to trace. When they finish, execute the following code to stop and then close the trace. This example uses the fn_trace_getinfo function to get the traceid to be used in the sp_trace_setstatus statements. -- After the trace is complete. DECLARE @TraceID int; -- Find the traceid of the current trace. SELECT @TraceID = traceid FROM ::fn_trace_getinfo(default) WHERE value = N'C:\TraceResults.trc'; -- First stop the trace. EXEC sp_trace_setstatus @TraceID, 0; -- Close and then delete its definition from SQL Server. EXEC sp_trace_setstatus @TraceID, 2; GO See Also sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Released Event Class 3/24/2017 • 3 min to read • Edit Online The Lock:Released event class indicates that a lock on a resource, such as a page, has been released. The Lock:Acquired and Lock:Released event classes can be used to monitor when objects are being locked, the type of locks taken, and for how long the locks were retained. Locks retained for long periods of time may cause contention issues and should be investigated. For example, an application can be acquiring locks on rows in a table, and then waiting for user input. Because the user input can take a long time to occur, the locks can block other users. In this instance, the application should be redesigned to make lock requests only when needed and not require user input when locks have been acquired. Lock: Released Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the lock was released. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 23. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes Mode int Resulting mode after the lock was released. 32 Yes 0=NULL Compatible with all other lock modes (LCK_M_NL) (LCK_M_NL) DATA COLUMN NAME DATA TYPE DESCRIPTION 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) 10=Shared with Intent Exclusive (LCK_M_SIX) 11=Update with Intent Exclusive (LCK_M_UIX) 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) COLUMN ID FILTERABLE DATA COLUMN NAME DATA TYPE DESCRIPTION 20=Key Range COLUMN ID FILTERABLE Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object which was released, if available and applicable. 22 Yes ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPAC E RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_U NIT See Also sp_trace_setevent (Transact-SQL) Lock:Acquired Event Class sys.dm_tran_locks (Transact-SQL) Lock:Timeout (timeout > 0) Event Class 3/24/2017 • 3 min to read • Edit Online The Lock:Timeout (timeout > 0) event class indicates that a request for a lock on a resource, such as a page, has timed out because another transaction is holding a blocking lock on the required resource. This event class behaves the same as the Lock:Timeout event class, except it does not include any events where the timeout value is 0. Include the Lock:Timeout (timeout > 0) event class in traces where you are using lock probes or other processes that have timeout values of zero. This allows you to see where actual time-outs are occurring without seeing timeout values of zero. Lock:Timeout (timeout > 0) Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the timeout occurred. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the time-out occurred. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting. 15 Yes EventClass int Type of event=189. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Mode int State that the event has received or is requesting. 32 Yes 0=NULL 1=Sch-S 2=Sch-M 3=S 4=U 5=X 6=IS 7=IU 8=IX 9=SIU 10=SIX 11=UIX 12=BU 13=RangeS-S 14=RangeS-U 15=RangeI-N 16=RangeI-S 17=RangeI-U 18=RangeI-X 19=RangeX-S 20=RangeX-U 21=RangeX-X NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int ID of the object, if available and applicable. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPAC E RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_U NIT See Also Lock:Timeout Event Class sp_trace_setevent (Transact-SQL) sys.dm_tran_locks (Transact-SQL) Lock:Timeout Event Class 3/24/2017 • 4 min to read • Edit Online The Lock:Timeout event class indicates that a request for a lock on a resource, such as a page, has timed out because another transaction is holding a blocking lock on the required resource. Time-out is determined by the @@LOCK_TIMEOUT system function and can be set with the SET LOCK_TIMEOUT statement. Use the Lock:Timeout event class to monitor when time-out conditions occur. This information is useful to determine if time-outs are significantly affecting the performance of your application, and which objects are involved. You can examine the application code that modifies these objects to determine if changes to minimize time-outs can be made. Lock:Timeout events with a duration of 0 are commonly the result of internal lock probes and are not necessarily an indication of a problem. The Lock:Timeout (timeout > 0) event can be used to ignore time-outs with a duration of 0. Lock:Timeout Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Lock resource identifier. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database in which the lock timeout occurred. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the time-out occurred. 35 Yes Duration bigint Amount of time (in microseconds) between the time the lock request was issued and the lock was timed out. 13 Yes EndTime datetime Time at which the event ended. 15 Yes EventClass int Type of event = 27. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 55 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes Mode int The resulting mode after the time-out. 32 Yes 0=NULL Compatible with all other lock modes (LCK_M_NL) 1=Schema Stability lock (LCK_M_SCH_S) 2=Schema Modification Lock (LCK_M_SCH_M) 3=Shared Lock (LCK_M_S) 4=Update Lock (LCK_M_U) 5=Exclusive Lock (LCK_M_X) 6=Intent Shared Lock (LCK_M_IS) 7=Intent Update Lock (LCK_M_IU) 8=Intent Exclusive Lock (LCK_M_IX) 9=Shared with intent to Update (LCK_M_SIU) DATA COLUMN NAME DATA TYPE DESCRIPTION 10=Shared with Intent Exclusive (LCK_M_SIX) COLUMN ID FILTERABLE 11=Update with Intent Exclusive (LCK_M_UIX) 12=Bulk Update Lock (LCK_M_BU) 13=Key range Shared/Shared (LCK_M_RS_S) 14=Key range Shared/Update (LCK_M_RS_U) 15=Key Range Insert NULL (LCK_M_RI_NL) 16=Key Range Insert Shared (LCK_M_RI_S) 17=Key Range Insert Update (LCK_M_RI_U) 18=Key Range Insert Exclusive (LCK_M_RI_X) 19=Key Range Exclusive Shared (LCK_M_RX_S) 20=Key Range Exclusive Update (LCK_M_RX_U) 21=Key Range Exclusive Exclusive (LCK_M_RX_X) NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int ID of the object which was timed out, if available and applicable. 22 Yes ObjectID2 bigint ID of the related object or entity, if available and applicable. 56 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerID int 1=TRANSACTION 58 Yes 2=CURSOR 3=SESSION 4=SHARED_TRANSAC TION_WORKSPACE 5=EXCLUSIVE_TRANS ACTION_WORKSPAC E RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1; while LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the lock type that was being acquired when the time-out occurred. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Type int 1=NULL_RESOURCE 57 Yes 2=DATABASE 3=FILE 5=OBJECT 6=PAGE 7=KEY 8=EXTENT 9=RID 10=APPLICATION 11=METADATA 12=AUTONAMEDB 13=HOBT 14=ALLOCATION_U NIT See Also sp_trace_setevent (Transact-SQL) Lock:Timeout (timeout > 0) Event Class sys.dm_tran_locks (Transact-SQL) Objects Event Category 3/24/2017 • 1 min to read • Edit Online The Objects event category contains general objects events. In This Section TOPIC DESCRIPTION Auto Stats Event Class Indicates that an automatic updating of index and column statistics has occurred. Object:Altered Event Class Indicates that an object has been altered; for example, by the ALTER DATABASE statement or the ALTER TABLE statement. Object:Created Event Class Indicates that an object has been created; for example, by the CREATE INDEX statement, the CREATE TABLE statement, or the CREATE DATABASE statement. Object:Deleted Event Class Indicates that an object has been deleted; for example, by the DROP INDEX statement or the DROP TABLE statement. See Also Extended Events Object:Altered Event Class 3/24/2017 • 3 min to read • Edit Online The Object:Altered event class indicates that an object has been altered; for example, by an ALTER INDEX, ALTER TABLE, or ALTER DATABASE statement. This event class can be used to determine if objects are being altered; for example, by ODBC applications, which often create temporary stored procedures. The Object:Altered event class always occurs as two events. The first event indicates the Begin phase. The second event indicates the Rollback or Commit phase. By monitoring the LoginName and NTUserName data columns, you can determine the name of the user who is creating, deleting, or altering objects. Object:Altered Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 164. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 0=Begin 1=Commit 2=Rollback GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the index_id column of the sys.indexes catalog view. 24 Yes IntegerData int Event sequence number of the corresponding Begin event. This column is available only for the Commit or Rollback type of event. subclass. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, NULL = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID2 bigint Partition function ID when the partition schema is altered, the queue ID when service is altered or the collection schema ID when XML schema is altered. 56 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sy.sobjects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the batch request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Object:Created Event Class 3/24/2017 • 3 min to read • Edit Online The Object:Created event class indicates that an object has been created, for example, by the CREATE INDEX, CREATE TABLE, or CREATE DATABASE statements. This event class can be used to determine if objects are being created, for example, by ODBC applications that often create temporary stored procedures. By monitoring the LoginName and NTUserName data columns, you can determine the name of the user who is creating, deleting, or accessing objects. Object:Created Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 46. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 0=Begin 1=Commit 2=Rollback GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the index_id column of the sys.indexes catalog view. 24 Yes IntegerData int Integer value dependent on the event class captured in the trace. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectID2 bigint ID of the related object or entity. 56 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows as Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Object:Deleted Event Class 3/24/2017 • 3 min to read • Edit Online The Object:Deleted event class indicates that an object has been deleted; for example, by DROP INDEX and DROP TABLE statements. This event class can be used to determine if objects are being deleted, for example, by ODBC applications that often create temporary stored procedures. By monitoring the LoginName and NTUserName default data columns, in addition to the Objects event classes, you can determine the name of the user who is creating, deleting, or accessing objects. Object:Deleted Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 47. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 0=Begin 1=Commit 2=Rollback GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the index_id column of the sys.indexes catalog view. 24 Yes IntegerData int Integer value dependent on the event class captured in the trace. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectID2 bigint ID of the related object or entity. 56 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) OLEDB Event Category 3/24/2017 • 1 min to read • Edit Online The OLEDB event category contains general OLEDB events. In This Section TOPIC DESCRIPTION OLEDB Call Event Class Indicates that Microsoft SQL Server has made a non-data or non-QueryInterface call to an OLE DB provider for distributed queries and remote stored procedures. OLEDB DataRead Event Class Indicates that SQL Server has called an OLE DB provider for distributed queries and remote stored procedures. OLEDB Errors Event Class Indicates that a call to an OLE DB provider returned an error. OLEDB Provider Information Event Class Indicates that a distributed query has run and has collected information that corresponds to the provider connection. OLEDB QueryInterface Event Class Indicates that SQL Server has issued an OLE DB QueryInterface call for distributed queries and remote stored procedures. See Also Extended Events OLEDB Call Event Class 3/24/2017 • 3 min to read • Edit Online The OLEDB Call event class occurs when SQL Server calls an OLE DB provider for distributed queries and remote stored procedures. Include the OLEDB Call event class in traces to monitor only those calls that do not request data or calls that are not made to the QueryInterface method. When the OLEDB Call event class is included in a trace the amount of overhead incurred depends on how frequently OLE DB calls occur against the database during the trace. If calls occur frequently, the trace may significantly impede performance. OLEDB Call Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID Int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID Int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration Bigint Length of time to complete the OLE DB Call event. 13 No EndTime Datetime Time that the event ended. 15 Yes Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass Int Type of event = 119. 27 No EventSequence Int Sequence of OLE DB event class in batch. 51 No EventSubClass Int 0=Starting 21 No 1=Completed GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LinkedServerName nvarchar Name of the linked server. 45 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes LoginSid Image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes MethodName nvarchar Name of the OLE DB method. 47 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ProviderName nvarchar Name of the OLE DB provider. 46 Yes RequestID Int ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID Int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData nvarchar Parameters sent and received in the OLE DB call. 1 No TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) OLE Automation Objects in Transact-SQL OLEDB DataRead Event Class 3/24/2017 • 3 min to read • Edit Online The OLEDB DataRead event class occurs when SQL Server calls an OLE DB provider for distributed queries and remote stored procedures. Include this event class in traces that monitor when SQL Server makes a data request call to the OLE DB provider. When the OLEDB DataRead class is included in a trace, the amount of overhead incurred will be high. It is recommended that you limit the use of this event class to traces that monitor specific problems for brief periods of time. OLEDB DataRead Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time to complete the OLE DB Call event. 13 No EndTime datetime Time the event ended. 15 Yes Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 121. 27 No EventSequence int Sequence of OLE DB event class in batch. 51 No EventSubClass int Type of event subclass. 21 No 0=Starting 1=Completed GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LinkedServerName nvarchar Name of the linked server. 45 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes MethodName nvarchar Name of the calling method. 47 No NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ProviderName nvarchar Name of the OLE DB provider. 46 Yes RequestID int ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID Int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData nvarchar Parameters sent and received in the OLE DB call. 1 No TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) OLE Automation Objects in Transact-SQL OLEDB Errors Event Class 3/24/2017 • 2 min to read • Edit Online The OLEDB Errors event class occurs in Microsoft SQL Server when a call to an OLE DB provider returns an error. Include this event class in traces to view a failed HRESULT from an OLE DB provider. When the OLEDB Errors event class is included in a trace, the amount of overhead depends on how frequently OLE DB provider errors occur against the database during the trace. If such errors occur frequently, the trace might significantly impede performance. OLEDB Errors Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Error int The HRESULT returned by the provider. 31 Yes EventClass int Type of event = 61. 27 No EventSequence int Sequence of OLE DB event class in batch. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LinkedServerName nvarchar Name of the linked server. 45 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\Username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE MethodName nvarchar Name of the OLE DB method. 47 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ProviderName nvarchar Name of the OLE DB provider. 46 Yes RequestID int ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData nvarchar Parameters sent and received in the OLE DB call. 1 No TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) OLE Automation Objects in Transact-SQL OLEDB Provider Information Event Class 3/24/2017 • 2 min to read • Edit Online The OLEDB Provider Information event class occurs when a distributed query is run and collects information corresponding to the provider connection. This event class contains all the properties that are collected from the remote provider by using various property sets, including the following: DBPROPSET_DATASOURCEINFO SQLPROPSET_OPTHINTS DBPROPSET_SQLSERVERDATASOURCEINFO ( SQL Server only) DBPROPSET_SQLSERVERDBINIT ( SQL Server only) DBPROPSET_ROWSET IDBInfo interface These properties, along with available metadata, are used by the query optimizer to choose the optimal execution plan for the query. This information is useful for tracing execution and analyzing OLE DB calls and events in distributed query profiler traces. OLEDB Provider Information Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 194. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LinkedServerName nvarchar Name of the linked server. 45 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ProviderName nvarchar Name of the OLE DB provider. 46 Yes RequestID int ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) OLE Automation Objects in Transact-SQL OLEDB QueryInterface Event Class 3/24/2017 • 3 min to read • Edit Online The OLEDB QueryInterface event class occurs when SQL Server issues an OLE DB QueryInterface call for distributed queries and remote stored procedures. Include this event class in traces that are monitoring problems associated with distributed queries and remote stored procedures. When the OLEDB QueryInterface event class is included, the amount of overhead will be high. If such events occur frequently, the trace may significantly impede performance. To minimize overhead incurred, limit use of this event class to traces that monitor specific problems for brief periods of time. OLEDB QueryInterface Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time to complete the OLE DB QueryInterface event. 13 No EndTime datetime Time the event ended. 15 Yes Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 120. 27 No EventSequence int Sequence of the OLE DB event class in the batch. 51 No EventSubClass int 0=Starting 21 No 1=Completed GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LinkedServerName nvarchar Name of the linked server. 45 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes MethodName nvarchar Name of the calling method. 47 No NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ProviderName nvarchar Name of the OLE DB provider. 46 Yes RequestID int ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData nvarchar Parameters sent and received in the OLE DB call. 1 No TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) OLE Automation Objects in Transact-SQL Performance Event Category 3/24/2017 • 1 min to read • Edit Online Use the Performance event category to monitor Showplan event classes and event classes that are produced from the execution of SQL data manipulation language (DML) operators. In This Section TOPIC DESCRIPTION Auto Stats Event Class Indicates that an automatic updating of index and column statistics has occurred. Degree of Parallelism (7.0 Insert) Event Class Indicates that SQL Server has executed a SELECT, INSERT, UPDATE, or DELETE statement using either a serial or parallel plan. The number of CPUs used to perform the operation is also reported. Performance Statistics Event Class Monitors performance of the queries that are being executed. Showplan All Event Class Identifies Showplan operators within a SQL statement. Showplan All for Query Compile Event Class Displays compile time data for Showplan operators. Showplan Statistics Profile Event Class Displays the estimated cost of a query. Showplan XML Event Class Identifies the Showplan operators in a SQL statement. The event class stores each event as a well defined XML document. Showplan XML for Query Compile Event Class Displays compile time data for Showplan operators in XML format. Showplan XML Statistics Profile Event Class Identifies the Showplan operators associated with a SQL statement. The output is an XML document. SQL:FullTextQuery Event Class Indicates that SQL Server has executed a full-text query. Plan Guide Successful Event Class Indicates that SQL Server successfully produced an execution plan for a query or batch that contained a plan guide. Plan Guide Unsuccessful Event Class Indicates that SQL Server could not produce an execution plan for a query or batch that contained a plan guide. See Also Extended Events Auto Stats Event Class 3/24/2017 • 3 min to read • Edit Online The Auto Stats event class indicates that an automatic updating of index and column statistics has occurred. Auto Stats Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int Identifier of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. 15 Yes Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 58. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass: 21 Yes 66 Yes 1: Statistics created/updated synchronously; TextData column indicates which statistics and whether they were created or updated 2: Asynchronous statistics update; job queued. 3: Asynchronous statistics update; job starting. 4: Asynchronous statistics update; job completed. GroupID int ID of the workload group where the SQL Trace event fires. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int ID for the index/statistics entry on the object affected by the event. To determine the index ID for an object, use the index_id column of the sys.indexes catalog view. 24 Yes IntegerData int Number of statistics collections that were successfully updated. 25 Yes IntegerData2 int Job sequence number. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int System-assigned ID of the object. 22 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 0 = error. 23 Yes 1 = success. 2 = skipped due to server throttling (MSDE). DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Contents of this column depends on whether statistics are updated synchronously (EventSubClass 1) or asynchronously (EventSubClass 2, 3, or 4): 1 Yes 1: Lists which statistics were updated/created 2, 3, or 4: NULL; IndexID column is populated with the index/statistics ID for statistics updated. TransactionID bigint System-assigned ID of the transaction. 4 Yes Type int Type of job. 57 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Degree of Parallelism (7.0 Insert) Event Class 3/24/2017 • 3 min to read • Edit Online The Degree of Parallelism (7.0 Insert) event class occurs each time SQL Server executes a SELECT, INSERT, UPDATE, or DELETE statement. When this event class is included in a trace, the amount of entailed overhead may significantly impede performance if these events occur frequently. To minimize overhead incurred, limit use of this event class to traces that briefly monitor specific problems. Degree of Parallelism (7.0 Insert) Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Number of CPUs used to complete the process based on the following values: 2 No 9 Yes 0x00000000, indicates a serial plan running in serial. 0x01000000, indicates a parallel plan running in serial. >= 0x02000000 indicates a parallel plan running in parallel. ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Event Class int Type of Event = 28. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Indicates the statement executed, based on the following values: 21 No 1=Select 2=Insert 3=Update 4=Delete GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Integer Data int The amount of "workspace memory" in kilobytes that the query has been granted to perform operations involving hashing, sorts or create index operations. The memory will be acquired during execution as needed. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int Request identification that initiated the fulltext query. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) INSERT (Transact-SQL) Performance Statistics Event Class 3/24/2017 • 10 min to read • Edit Online The Performance Statistics event class can be used to monitor the performance of queries, stored procedures, and triggers that are executing. Each of the six event subclasses indicates an event in the lifetime of queries, stored procedures, and triggers within the system. Using the combination of these event subclasses and the associated sys.dm_exec_query_stats, sys.dm_exec_procedure_stats and sys.dm_exec_trigger_stats dynamic management views, you can reconstitute the performance history of any given query, stored procedure, or trigger. Performance Statistics Event Class Data Columns The following tables describe the event class data columns associated with each of the following event subclasses: EventSubClass 0, EventSubClass 1,EventSubClass 2,EventSubClass 3, EventSubClass 4, and EventSubClass 5. EventSubClass 0 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint NULL 52 Yes BinaryData image NULL 2 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 0 = New batch SQL text that is not currently present in the cache. The following EventSubClass types are generated in the trace for ad hoc batches. For ad hoc batches with n number of queries: 1 of type 0 IntegerData2 int NULL 55 Yes ObjectID int NULL 22 Yes Offset int NULL 61 Yes PlanHandle Image NULL 65 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image SQL handle that can be used to obtain the batch SQL text using the sys.dm_exec_sql_text dynamic management view. 63 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext SQL text of the batch. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint The cumulative number of times this plan has been recompiled. 52 Yes BinaryData image The binary XML of the compiled plan. 2 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventSequence int Sequence of a given event within the request. 51 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes EventSubClass 1 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 55 Yes 1 = Queries within a stored procedure have been compiled. The following EventSubClass types are generated in the trace for stored procedures. For stored procedures with n number of queries: n number of type 1 IntegerData2 int End of the statement within the stored procedure. -1 for the end of the stored procedure. ObjectID int System-assigned ID of the object. 22 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image SQL handle that can be used to obtain the SQL text of the stored procedure using the dm_exec_sql_text dynamic management view. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext NULL 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE PlanHandle image The plan handle of the compiled plan for the stored procedure. This can be used to obtain the XML plan by using the sys.dm_exec_query_pl an dynamic management view. 65 Yes ObjectType int A value that represents the type of object involved in the event. 28 Yes 8272 = stored procedure BigintData2 bigint Total memory, in kilobytes, used during compilation. 53 Yes CPU int Total CPU time, in milliseconds, spent during compilation. 18 Yes Duration int Total time, in microseconds, spent during compilation. 13 Yes IntegerData int The size, in kilobytes, of the compiled plan. 25 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint The cumulative number of times this plan has been recompiled. 52 Yes BinaryData image The binary XML of the compiled plan. 2 Yes EventSubClass 2 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventSequence int Sequence of a given event within the request. 51 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes EventSubClass int Type of event subclass. 21 Yes 2 = Queries within an ad hoc SQL statement have been compiled. The following EventSubClass types are generated in the trace for ad hoc batches. For ad hoc batches with n number of queries: n number of type 2 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData2 int End of the statement within the batch. 55 Yes -1 for the end of the batch. ObjectID int N/A 22 Yes Offset int Starting offset of the statement within the batch. 61 Yes 0 for the beginning of the batch. SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image SQL handle. This can be used to obtain the batch SQL text using the dm_exec_sql_text dynamic management view. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext NULL 1 Yes PlanHandle image The plan handle of the compiled plan for the batch. This can be used to obtain the batch XML plan using the dm_exec_query_plan dynamic management view. 65 Yes BigintData2 bigint Total memory, in kilobytes, used during compilation. 53 Yes CPU int Total CPU time, in microseconds, spent during compilation. 18 Yes Duration int Total time, in milliseconds, spent during compilation. 13 Yes IntegerData int The size, in kilobytes, of the compiled plan. 25 Yes EventSubClass 3 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint The cumulative number of times this plan has been recompiled. 52 Yes BinaryData image NULL 2 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventSequence int Sequence of a given event within the request. 51 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 55 Yes 3 = A cached query has been destroyed and the historical performance data associated with the plan is about to be destroyed. The following EventSubClass types are generated in the trace. For ad hoc batches with n number of queries: 1 of type 3 when the query is flushed from the cache For stored procedures with n number of queries: 1 of type 3 when the query is flushed from the cache. IntegerData2 int End of the statement within the stored procedure or batch. -1 for the end of the stored procedure or batch. ObjectID int NULL 22 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes 12 Yes 0 for the beginning of the stored procedure or batch. SPID int ID of the session on which the event occurred. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SqlHandle image SQL handle that can be used to obtain the stored procedure or batch SQL text using the dm_exec_sql_text dynamic management view. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext QueryExecutionStats 1 Yes PlanHandle image The plan handle of the compiled plan for the stored procedure or batch. This can be used to obtain the XML plan using the dm_exec_query_plan dynamic management view. 65 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint NULL 52 Yes BinaryData image NULL 2 Yes DatabaseID int ID of the database in which the given stored procedure resides. 3 Yes EventSequence int Sequence of a given event within the request. 51 No EventSubClass 4 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes EventSubClass int Type of event subclass. 21 Yes 4 = A cached stored procedure has been removed from the cache and the historical performance data associated with it is about to be destroyed. IntegerData2 int NULL 55 Yes ObjectID int ID of the stored procedure. This is same as the object_id column in sys.procedures. 22 Yes Offset int NULL 61 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image SQL handle that can be used to obtain the stored procedure SQL text that was executed using the dm_exec_sql_text dynamic management view. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext ProcedureExecutionSt ats 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE PlanHandle image The plan handle of the compiled plan for the stored procedure. This can be used to obtain the XML plan using the dm_exec_query_plan dynamic management view. 65 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE BigintData1 bigint NULL 52 Yes BinaryData image NULL 2 Yes DatabaseID int ID of the database in which the given trigger resides. 3 Yes EventSequence int Sequence of a given event within the request. 51 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes EventSubClass int Type of event subclass. 21 Yes EventSubClass 5 5 = A cached trigger has been removed from the cache and the historical performance data associated with it is about to be destroyed. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData2 int NULL 55 Yes ObjectID int ID of the trigger. This is same as the object_id column in sys.triggers/sys.server _triggers catalog views. 22 Yes Offset int NULL 61 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle image SQL handle that can be used to obtain the trigger's SQL text using the dm_exec_sql_text dynamic management view. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext TriggerExecutionStats 1 Yes PlanHandle image The plan handle of the compiled plan for the trigger. This can be used to obtain the XML plan using the dm_exec_query_plan dynamic management view. 65 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan XML for Query Compile Event Class Dynamic Management Views and Functions (Transact-SQL) Showplan All Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan All event class occurs when Microsoft SQL Server executes an SQL statement. The information included is a subset of the information available in the Showplan XML Statistics Profile or Showplan XML event class. The Showplan All event class displays complete, compile-time data, and so traces that contain Showplan All may incur significant performance overhead. To minimize this, limit use of this event class to traces that monitor specific problems for brief periods of time. When the Showplan All event class is included in a trace, the BinaryData data column must be selected. If it is not, information for this event class will not be displayed in the trace. Showplan All Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the Showplan text. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID Int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Event Class Int Type of Event = 97. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes Integer Data Integer Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also SQL Server Profiler sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan XML Statistics Profile Event Class Showplan XML Event Class Showplan All for Query Compile Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan All for Query Compile event class occurs when Microsoft SQL Server compiles a SQL statement. Include this event class to identify the Showplan operators. The information included is a subset of the information available in the Showplan XML For Query Compile event class. The Showplan All for Query Compileevent class displays complete, compile-time data, and so traces that contain Showplan All for Query Compile may incur significant performance overhead. To minimize this, limit use of this event class to traces monitoring specific problems for brief periods of time. When the Showplan All for Query Compile event class is included in a trace, the BinaryData data column must be selected. If it is not, information for this event class will not be displayed in the trace. Showplan All for Query Compile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the query. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of Event = 169. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int Server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan Statistics Profile Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan Statistics Profile event class occurs when Microsoft SQL Server executes an SQL statement. The information included is a subset of the information available in the Showplan XML Statistics Profile event class. The Showplan Statistics Profile event class displays complete compile-time data; traces that contain Showplan Statistics Profile may incur significant performance overhead. To minimize this, limit use of this event class to traces monitoring specific problems for brief periods of time. When the Showplan Statistics Profile event class is included in a trace, the BinaryData data column must be selected. If it is not, information for this event class will not be displayed in the trace. Showplan Statistics Profile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the query. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of Event = 98. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan XML Statistics Profile Event Class Showplan Text Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan Text event class occurs when Microsoft SQL Server executes an SQL statement. The information included is a subset of the information available in Showplan All, Showplan XML Statistics Profile or Showplan XML event class. When the Showplan Text event class is included in a trace, the amount of overhead will significantly impede performance. To minimize this, limit use of this event class to traces that monitor specific problems for brief periods of time. Showplan Text will not incur as much overhead as other Showplan event classes. When the Showplan Text event class is included in a trace, the BinaryData data column must be selected. If it is not, information for this event class will not be displayed in the trace. Showplan Text Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the Showplan text. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Event Class int Type of Event = 96. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes Integer Data integer Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Login SID bitmap Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int Request identification that initiated the full text query. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan All Event Class Showplan XML Statistics Profile Event Class Showplan XML Event Class Showplan Text (Unencoded) Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan Text (Unencoded) event class occurs when Microsoft SQL Server executes an SQL statement. This event class is the same as the Showplan Text event class, except the event information is formatted as a string rather than as binary data. The information included is a subset of the information available in Showplan All, Showplan XML, or Showplan XML Statistics Profile event classes. When the Showplan Text (Unencoded) event class is included in a trace, the amount of overhead can significantly impede performance. Showplan Text (Unencoded) will not incur as much overhead as other Showplan event classes. To minimize overhead incurred, limit the use of this event class to traces that monitor specific problems for brief periods of time. Showplan Text (Unencoded) Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 68. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Integer value dependent on the event class captured in the trace. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LineNumber int Displays the number of the line containing the error. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan All Event Class Showplan XML Event Class Showplan XML Statistics Profile Event Class Showplan XML Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan XML event class occurs when Microsoft SQL Server executes an SQL statement. Include the Showplan XML event class to identify the Showplan operators. This event class stores each event as a well-defined XML document. When the Showplan XML event class is included in a trace, the amount of overhead will significantly impede performance. Showplan XML stores a query plan that is created when the query is optimized. To minimize the overhead incurred, limit use of this event class to traces that monitor specific problems for brief periods of time. The Showplan XML documents have a schema associated with them. This schema can be found at the Microsoft Web Site, or as part of your Microsoft SQL Server installation. Showplan XML Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the query. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database. 35 No Event Class int Type of Event = 122. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes Integer Data integer Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan XML for Query Compile Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan XML For Query Compile event class occurs when Microsoft SQL Server compiles an SQL statement. Include thisevent class to identify the Showplan operators on Microsoft SQL Server. The Showplan XML For Query Compile event class displays complete, compile time data, so traces that contain this event class can incur significant performance overhead. To minimize this, limit use of this event class to traces that monitor specific problems for brief periods of time. The Showplan XML documents have a schema associated with them. This schema can be found at the Microsoft Web Site, or as part of your SQL Server installation. Showplan XML for Query Compile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the query. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Event Class int Type of Event = 168. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image The security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar The name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in sys.objects. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes See Also sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference Showplan XML Statistics Profile Event Class 3/24/2017 • 3 min to read • Edit Online The Showplan XML Statistics Profile event class occurs when Microsoft SQL Server executes an SQL statement. Include the Showplan XML Statististics Profile event class to identify the Showplan operators on Microsoft SQL Server. The Showplan XML Statistics Profile event class displays complete, compile-time data, and so traces that contain this event class may incur significant performance overhead. To minimize overhead incurred, limit use of this event class to traces that monitor specific problems for brief periods of time. The Showplan XML documents have a schema associated with them. This schema can be found at the Microsoft Web Site, or as part of your SQL Server installation. Showplan XML Statistics Profile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Estimated cost of the query. 2 No ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Event Class int Type of Event = 146. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Estimated number of rows returned. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LineNumber int Displays the number of the line containing the error. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSID image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 No NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar The name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Microsoft Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Showplan Logical and Physical Operators Reference SQL:FullTextQuery Event Class 3/24/2017 • 2 min to read • Edit Online The SQL:FullTextQuery event class occurs when SQL Server executes a full text query. Include this event class in traces that are monitoring problems associated with full text catalogs. When the SQL:FullTextQuery event class is included, the amount of overhead will be high. If such events occur frequently, the trace may significantly impede performance. To minimize this, limit the use of this event class to traces that monitor specific problems for brief periods of time. SQL:FullTextQuery Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Length of time to complete the Full Text Query. 13 No EndTime datetime Time event ended 15 Yes Error int Error message number. 31 Yes EventClass int Type of event recorded = 123. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Number of rows returned. If the query returns an error, the value is NULL. If the query returns no rows, the value is 0. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes ObjectID int System-assigned ID of the target 22 Yes RequestID int Request identification that initiated the full text query. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData nvarchar The full text portion of the query submitted to SQL Server. 1 No TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Plan Guide Successful Event Class 3/24/2017 • 2 min to read • Edit Online The Plan Guide Successful event class indicates that SQL Server successfully produced an execution plan for a query or batch that contained a plan guide. The event fires when the following conditions are true: The batch or module in the plan guide definition matches the batch or module that is being executed. The query in the plan guide definition matches the query being executed. The hints in the plan guide definition, including the USE PLAN hint, were applied successfully to the query. That is, the compiled query plan honors the specified hints. Plan Guide Successful Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values that are passed by the application instead of the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a specified instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 214. 27 No EventSequence int Sequence of a specific event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process: 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals or the sys.sql_logins catalog views. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int Object ID of the module that was being compiled when the plan guide was applied. If the plan guide was not applied to a module, this column is set to NULL. 22 Yes RequestID int ID of the request that contains the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server that is being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Name of the plan guide. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Plan Guide Unsuccessful Event Class Extended Events sp_trace_setevent (Transact-SQL) Plan Guide Unsuccessful Event Class 3/24/2017 • 3 min to read • Edit Online The Plan Guide Unsuccessful event class indicates that SQL Server could not produce an execution plan for a query or batch that contained a plan guide. Instead, the plan was compiled without using the plan guide. The event fires when the following conditions are true: The batch/module in the plan guide definition matches the batch that is being executed. The query in the plan guide definition matches the query that is being executed. The hints in the plan guide definition, including the USE PLAN hint, were not applied successfully to the query or batch. That is, the compiled query plan could not honor the specified hints and the plan was compiled without using the plan guide. An invalid plan guide might cause this event to fire. Validate the plan guide that is used by the query or batch by using the sys.fn_validate_plan_guide function, and correct the error that is reported by this function. This event is included in the SQL Server Profiler Tuning template. Plan Guide Unsuccessful Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values that are passed by the application instead of the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a specified instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 218. 27 No EventSequence int Sequence of a specific event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process: 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals or the sys.sql_logins catalog views. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int Object ID of the module that was being compiled when the plan guide was applied. If the plan guide was not applied to a module, this column is set to NULL. 22 Yes RequestID int ID of the request that is containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server that is being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Name of the plan guide. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Plan Guide Successful Event Class Extended Events sp_trace_setevent (Transact-SQL) sys.fn_validate_plan_guide (Transact-SQL) sp_create_plan_guide (Transact-SQL) sp_create_plan_guide_from_handle (Transact-SQL) Progress Report Event Category 3/24/2017 • 1 min to read • Edit Online The Progress Report event category contains the Progress Report: Online Index Operation event class. TOPIC DESCRIPTION Progress Report: Online Index Operation Event Class Indicates the progress of an online index build operation. See Also SQL Server Profiler Progress Report: Online Index Operation Event Class 3/24/2017 • 3 min to read • Edit Online The Progress Report: Online Index Operation event class indicates the progress of an online index build operation while the build process is running. Progress Report: Online Index Operation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint Number of rows inserted. 52 Yes BigintData2 bigint 0 = serial plan; otherwise, the thread ID during parallel execution. 53 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the online index operation completed. 15 Yes EventClass int Type of event = 190. 27 No EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 66 Yes 1=Start 2=Stage 1 execution begin 3=Stage 1 execution end 4=Stage 2 execution begin 5=Stage 2 execution end 6=Inserted row count 7=Done Stage 1 refers to the base object (clustered index or heap), or if the index operation involves one nonclustered index only. Stage 2 is used when an index build operation involves both the original rebuild plus additional non-clustered indexes. For example, if an object has a clustered index and several non-clustered indexes, 'rebuild all' would rebuild all indexes. The base object (the clustered index) is rebuilt in stage 1, and then all the non-clustered indexes are rebuilt in stage 2. GroupID int ID of the workload group where the SQL Trace event fires. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int ID for the index on the object affected by the event. 24 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes PartitionId bigint The ID of the partition being built. 65 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE PartitionNumber int The ordinary number of the partition being built. 25 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) Query Notifications Event Category 3/24/2017 • 1 min to read • Edit Online The Query Notifications event category contains event classes that report information that developers and administrators can use to monitor and troubleshoot query notifications. In This Section QN:Dynamics Event Class Reports information about the background activity that the Database Engine performs to support query notifications. QN:Parameter Table Event Class Reports information about the operations required to create, maintain, and drop the internal tables that store parameter information for subscriptions. QN:Subscription Event Class Reports information about notification subscriptions. QN:Template Event Class Reports information about the internal use of query templates. See Also SQL Trace SQL Server Profiler sp_trace_setevent (Transact-SQL) QN:Dynamics Event Class 3/24/2017 • 3 min to read • Edit Online The QN:Dynamics event class reports information about the background activity that the Database Engine performs to support query notifications. Within the Database Engine, a background thread monitors subscription time-outs, pending subscriptions to be fired, and parameter table destruction. QN:Dynamics Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseName nvarchar The name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 202 27 No EventSequence int Sequence number for this event. 51 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values: 21 Yes 66 Yes Clock run started: Indicates that the background thread in the Database Engine that schedules expired parameter tables for cleanup has started. Clock run finished: Indicates that the background thread in the Database Engine that schedules expired parameter tables for cleanup has finished. Master cleanup task started: Indicates when cleanup (garbage collection) to remove expired query notification subscription data starts. Master cleanup task finished: Indicates when cleanup (garbage collection) to remove expired query notification subscription data finishes. Master cleanup task skipped: Indicates that the Database Engine did not perform cleanup (garbage collection) to remove expired query notification subscription data. GroupID int ID of the workload group where the SQL Trace event fires. DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginName nvarchar The name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username). 11 No LoginSID image The security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes RequestID int Identifier of the request that contains the statement. 49 Yes ServerName nvarchar The name of the instance of SQL Server being traced. 26 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE SessionLoginName nvarchar Login name of the user that originated the session. For example, if an application connects to SQL Server using Login1 and executes a statement as Login2, SessionLoginName shows "Login1" and LoginName shows "Login2". This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Returns an XML document containing information specific to this event. This document conforms to the XML schema available at the SQL Server Query Notification Profiler Event Schema page. 1 Yes QN:Parameter Table Event Class 3/24/2017 • 3 min to read • Edit Online The QN:Parameter table event reports information about the operations required to create, keep reference counts for, and drop the internal tables that store parameter information. This event also reports the internal activity to reset the usage count for a parameter table. QN:Parameter table Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseName nvarchar The name of the database in which the user statement is running. 35 Yes EventClass Int Type of event = 200. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values: 21 Yes Table created: Indicates a parameter table has been created in the database. Table drop attempt: Indicates that the database has attempted to automatically drop an unused parameter table to free resources. Table drop attempt failed: Indicates that the database tried to drop an unused parameter table and failed. The Database Engine will automatically reschedule deletion of the parameter table to free up resources. Table dropped: Indicates that the database successfully dropped a parameter table. Table pinned: Indicates that the parameter table is marked for current usage by internal processing. Table unpinned: Indicates that the parameter table has been unpinned. DATA COLUMN TYPE been unpinned. DESCRIPTION Internal processing has finished using the table. COLUMN NUMBER FILTERABLE 66 Yes Number of users incremented: Indicates that the number of query notification subscriptions that reference a parameter table has increased. Number of users decremented: Indicates that the number of query notification subscriptions that reference a parameter table has decreased. LRU counter reset: Indicates that the usage count for the parameter table has been reset. Cleanup task started: Indicates when cleanup for all subscriptions in this parameter table has started. This occurs when the database starts up or when a table underlying the subscriptions of this parameter table is dropped. Cleanup task finished: Indicates when cleanup for all subscriptions in this parameter table has finished. GroupID int ID of the workload group where the SQL Trace event fires. DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system LoginName nvarchar The name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username). 11 No LoginSID image The security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes RequestID int Identifier of the request that contains the statement. 49 Yes ServerName nvarchar The name of the instance of SQL Server being traced. 26 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE SessionLoginName nvarchar Login name of the user that originated the session. For example, if an application connects to SQL Server using Login1 and executes a statement as Login2, SessionLoginName shows "Login1" and LoginName shows "Login2". This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Returns an XML document containing information specific to this event. This document conforms to the XML schema available at the SQL Server Query Notification Profiler Event Schema page. 1 Yes QN:Subscription Event Class 3/24/2017 • 3 min to read • Edit Online The QN:Subscription event reports information on notification subscriptions. QN:Subscription Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar The name of the database in which the user statement is running. 35 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE EventClass int Type of event = 199. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values: 21 Yes Subscription registered: Indicates when the query notification subscription is successfully registered in the database. Subscription rewound: Indicates when the Database Engine receives a subscription request that exactly matches an existing subscription. In this case, the Database Engine sets the timeout value of the existing subscription to the time-out specified in the new subscription request. Subscription fired: Indicates when a notification subscription produces a notification message. Firing failed with broker error: Indicates when a notification message fails due to a Service Broker error. Firing failed without broker error: Indicates when a notification message fails but is not due to a Service Broker error. Broker error intercepted: Indicates that Service DATA COLUMN TYPE Broker delivered an DESCRIPTION error in the conversation that the query notification uses. COLUMN NUMBER FILTERABLE Subscription deletion attempt: Indicates that the Database Engine attempted to delete an expired subscription to free up resources. Subscription deletion failed: Indicates that the attempt to delete an expired subscription has failed. The Database Engine will automatically reschedule the subscription for deletion to free up resources. Subscription destroyed: Indicates that the Database Engine successfully deleted an expired subscription. GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE LoginName nvarchar The name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username). 11 No LoginSID image The security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes RequestID int Identifier of the request that contains the statement. 49 Yes ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if an application connects to SQL Server using Login1 and executes a statement as Login2, SessionLoginName shows "Login1" and LoginName shows "Login2". This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TextData ntext Returns an XML document containing information specific to this event. This document conforms to the XML schema available at the SQL Server Query Notification Profiler Event Schema page. 1 Yes QN:Template Event Class 3/24/2017 • 3 min to read • Edit Online The QN:Template event reports information on the internal use of query templates. Query templates are the mechanism that the Database Engine uses to share definitions of a query for notification. These templates are created along with parameter tables. The Database Engine creates an event of this type when a query template is created, used, or destroyed. QN:Template Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE DatabaseName nvarchar The name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 201. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass nvarchar The type of event subclass, providing further information about each event class. This column may contain the following values: 21 Yes Template created: Indicates that a query notification template has been created in the database. Template matched: Indicates when a query notification template is reused. Template dropped: Indicates when a query notification template is removed from the database. GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 60 No 0 = user 1 = system DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE LoginName nvarchar The name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username). 11 No LoginSID image The security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes RequestID int Identifier of the request that contains the statement. 49 Yes ServerName nvarchar The name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user that originated the session. For example, if an application connects to SQL Server using Login1 and executes a statement as Login2, SessionLoginName shows "Login1" and LoginName shows "Login2". This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TextData ntext Returns an XML document containing information specific to this event. This document conforms to the XML schema available at the SQL Server Query Notification Profiler Event Schema page. 1 Yes Scans Event Category 3/24/2017 • 1 min to read • Edit Online The Scans event category contains scan events. In This Section TOPIC DESCRIPTION Scan:Started Event Class Indicates that a table or index scan has started. Scan:Stopped Event Class Indicates that a table or index scan has stopped. Scan:Started Event Class 3/24/2017 • 2 min to read • Edit Online The Scan:Started event class occurs when a table or index scan is started. Scan:Started Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 51. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int The index that is being scanned (if an index). 24 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object being scanned. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Scan:Stopped Event Class 3/24/2017 • 2 min to read • Edit Online The Scan:Stopped event class occurs when a table or index scan stops. Scan:Stopped Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event=52. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int Index that is being scanned. 24 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object that is being scanned. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Reads bigint Number of pages read (logically). 16 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Security Audit Event Category (SQL Server Profiler) 3/24/2017 • 3 min to read • Edit Online The Security Audit event category contains security audit events. In This Section TOPIC DESCRIPTION Audit Add DB User Event Class Indicates that a login has been added or removed as a database user to a database. Audit Add Login to Server Role Event Class Indicates that a login was added or removed from a fixed server role. Audit Add Member to DB Role Event Class Indicates that a login has been added to or removed from a role. Audit Add Role Event Class Indicates that a database role was added to or removed from a database. Audit Addlogin Event Class Indicates that a login has been added or removed. Audit App Role Change Password Event Class Indicates that a password has been changed for an application role. Audit Backup and Restore Event Class Indicates that a backup or restore statement has been issued. Audit Broker Conversation Event Class Reports audit messages related to Service Broker dialog security. Audit Broker Login Event Class Reports audit messages related to Service Broker transport security. Audit Change Audit Event Class Indicates that an audit trace modification has been made. Audit Change Database Owner Event Class Indicates that the permissions to change the owner of a database have been checked. Audit Database Management Event Class Indicates that a database has been created, altered, or dropped. Audit Database Mirroring Login Event Class Reports audit messages related to database mirroring transport security. Audit Database Object Access Event Class Indicates that a database object, such as a schema, has been accessed. Audit Database Object GDR Event Class Indicates that a GDR event for a database object has occurred. TOPIC DESCRIPTION Audit Database Object Management Event Class Indicates that a CREATE, ALTER, or DROP statement was executed on a database object. Audit Database Object Take Ownership Event Class Indicates that there has been a change of owner for objects in database scope. Audit Database Operation Event Class Indicates that various operations such as checkpoint or subscribe query notification have occurred. Audit Database Principal Impersonation Event Class Indicates that an impersonation has occurred within the database scope. Audit Database Principal Management Event Class Indicates that principals have been created, altered, or dropped from a database. Audit Database Scope GDR Event Class Indicates that a GRANT, REVOKE, or DENY has been issued for a statement permission by a user in Microsoft SQL Server. Audit DBCC Event Class Indicates that a DBCC command has been issued. Audit Fulltext Event Class Indicates that a full-text event has occured. Audit Login Change Password Event Class Indicates that a user has changed their SQL Server login password. Audit Login Change Property Event Class Indicates that sp_defaultdb, sp_defaultlanguage, or ALTER LOGIN was used to modify a property of a login. Audit Login Event Class Indicates that a user has successfully logged into SQL Server. Audit Login Failed Event Class Indicates that a user attempted to log in to SQL Server and failed. Audit Login GDR Event Class Indicates that a Microsoft Windows login right was added or removed. Audit Logout Event Class Indicates that a user has logged out of SQL Server. Audit Object Derived Permission Event Class Indicates that a CREATE, ALTER, or DROP was issued for an object. Audit Schema Object Access Event Class Indicates that an object permission (such as SELECT) has been used. Audit Schema Object GDR Event Class Indicates that a GRANT, REVOKE, or DENY was issued for a schema object permission by a user in SQL Server. Audit Schema Object Management Event Class Indicates that a server object has been created, altered, or dropped. Audit Schema Object Take Ownership Event Class Indicates that the permissions to change the owner of schema object have been checked. TOPIC DESCRIPTION Audit Server Alter Trace Event Class Indicates that the ALTER TRACE permission has been checked. Audit Server Object GDR Event Class Indicates that a GDR event for a schema object has occurred. Audit Server Object Management Event Class Indicates that a CREATE, ALTER, or DROP event has occurred for a server object. Audit Server Object Take Ownership Event Class Indicates that a server object owner has changed. Audit Server Operation Event Class Indicates that Audit operations have occurred in the server. Audit Server Principal Impersonation Event Class Indicates that an impersonation has occurred within the server scope. Audit Server Principal Management Event Class Indicates that a CREATE, ALTER, or DROP has occurred for a server principal. Audit Server Scope GDR Event Class Indicates that a GDR event has occurred for server permissions. Audit Server Starts and Stops Event Class Indicates that the SQL Server service state has been modified. Audit Statement Permission Event Class Indicates that a statement permission has been used. Related Content Extended Events Audit Add DB User Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Add DB User event class occurs whenever a login is added or removed as a database user to a database. This event class is used for the sp_grantdbaccess, sp_revokedbaccess, sp_adduser, and sp_dropuser stored procedures. This event class may be removed in a future version of SQL Server. It is recommended that you use the Audit Database Principal Management event class instead. Audit Add DB User Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes ColumnPermissions int Indicator of whether a column permission was set. Parse the statement text to determine which permissions were applied to which columns. 44 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database where the username is being added or removed. 35 Yes DBUserName nvarchar Issuer’s username in the database. 40 Yes EventClass int Type of event = 109. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 8 Yes 1=Add 2=Drop 3=Grant database access 4=Revoke database access HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of the database role whose membership is being modified (if done with sp_adduser). 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar Name of the login that is having its database access modified. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TargetUserName nvarchar Name of the database user being added. 39 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) sp_grantdbaccess (Transact-SQL) sp_revokedbaccess (Transact-SQL) sp_adduser (Transact-SQL) sp_dropuser (Transact-SQL) Audit Database Principal Management Event Class Audit Add Login to Server Role Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Add Login to Server Role event class occurs whenever a login is added or removed from a fixed server role. This event class is used for the sp_addsrvrolemember and sp_dropsrvrolemember stored procedures. Audit Add Login to Server Role Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar Name of the database user who added or removed the login. 40 Yes EventClass int Type of event = 108. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Add 2=Drop HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of the fixed server role whose membership is being modified. 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) sp_addsrvrolemember (Transact-SQL) sp_dropsrvrolemember (Transact-SQL) Audit Add Member to DB Role Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Add Member to DB Role event class occurs whenever a login is added to or removed from a database role. This event class is used with the sp_addrolemember, sp_changegroup, and sp_droprolemember stored procedures. Audit Add Member to DB Role Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database where the role membership is modified. 35 Yes DBUserName nvarchar Issuer’s username in the database. 40 Yes EventClass int Type of event = 110. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Add 2=Drop 3=Change group HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of an application role being enabled. 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetUserName nvarchar Name of the user whose role membership is being modified. 39 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) sp_addrolemember (Transact-SQL) sp_droprolemember (Transact-SQL) Audit Add Role Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Add Role event class occurs when a database role is added to or removed from a database. This event class is used by the sp_addrole and sp_droprole stored procedures. This event class may be removed from a future version of Microsoft SQL Server. It is recommended that you use the Audit Database Principal Management event class instead. Audit Add Role Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar Issuer’s username in the database. 40 Yes EventClass int Type of event = 111. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Add 2=Drop HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of the database role that is being added or removed. 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check. 23 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) sp_addrole (Transact-SQL) sp_droprole (Transact-SQL) Audit Database Principal Management Event Class Audit Addlogin Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Addlogin event class occurs when a Microsoft SQL Server login is added or removed. If you set additional properties when the login is added, such as default database, the information about these properties will be found in the TextData column of this event. If you set these properties while adding a login, the Audit Login Change Property Event will not occur. This audit event is for the sp_addlogin and sp_droplogin stored procedures. This event class may be removed in a future version of SQL Server. It is recommended that you use the Audit Server Principal Management event class instead. Audit Addlogin Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 104. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Add 2=Drop HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check. 23 Yes TargetLoginName nvarchar The name of the login to be added or dropped. 42 Yes TargetLoginSid image The security identification number (SID) of the targeted login (if passed in as a parameter). 43 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Login Change Property Event Class sp_addlogin (Transact-SQL) sp_droplogin (Transact-SQL) Audit Server Principal Management Event Class Audit App Role Change Password Event Class 3/24/2017 • 2 min to read • Edit Online The Audit App Role Change Password event class occurs whenever a password is changed for an application role. Audit App Role Change Password Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database where the application role is being modified. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar Issuer’s username in the database. 40 Yes EventClass int Type of event = 112. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of the application role. 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Audit Backup and Restore Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Backup/Restore event class occurs whenever a backup or restore command is issued. Audit Backup/Restore Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar The issuer's username in the database. 40 Yes EventClass int Type of event = 115. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Backup 2=Restore 3=BackupLog HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext SQL text of the backup or restore statement. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Back Up and Restore of SQL Server Databases BACKUP (Transact-SQL) RESTORE (Transact-SQL) Audit Broker Conversation Event Class 3/24/2017 • 4 min to read • Edit Online SQL Server creates an Audit Broker Conversation event to report audit messages related to Service Broker dialog security. Audit Broker Conversation Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar The name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BigintData1 bigint The message sequence number of the message. 52 No ClientProcessID int The ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int The ID of the database specified by the USE database statement, or the ID of the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE Error int The SQL Server error number, if this event reports an error. 31 No EventClass int The type of event class captured. Always 158 for Audit Broker Conversation. 27 No EventSubClass int The type of event subclass, providing further information about each event class. The table below lists the event subclass values for this event. 21 Yes FileName nvarchar The reason for the login failure. If the login succeeded, this column is empty. 36 No GUID uniqueidentifier The conversation id of the dialog. This identifier is transmitted as part of the message, and is shared between both sides of the conversation. 54 No HostName nvarchar The name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The fragment number of the message. 25 No NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ObjectId int The user ID of the target service. 22 No RoleName nvarchar The role of the conversation handle. This is either initiator or target. 38 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No Severity int The SQL Server error severity, if this event reports an error. 29 No SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced. 30 No TextData ntext For errors, contains a message that describes the reason for the failure. One of the following values: 1 Yes Cert not found. The user specified for dialog protocol security has no certificate. Not in valid time period. The user specified for dialog protocol security has a certificate, but the certificate has expired. certificate has expired. DATA COLUMN TYPE DESCRIPTION Cert too large for memory allocation. The user specified for dialog protocol security has a certificate, but the certificate is too large. The maximum certificate size that Service Broker supports is 32,768 bytes. Private key not found. The user specified for dialog protocol security has a certificate, but there is no private key associated with that certificate. The cert's private key size is incompatible with the crypto provider. The private key for the certificate has a key size that cannot be successfully processed. The private key size must be a multiple of 64 bytes. The cert's public key size is incompatible with the crypto provider. The public key for the certificate has a key size that cannot be successfully processed. The public key size must be a multiple of 64 bytes. The cert's private key size is incompatible with the encrypted key exchange key. The key size specified in the key exchange key does not match the size of the private key for the certificate. This generally indicates that the certificate on the remote computer does not match the certificate in the database. COLUMN NUMBER FILTERABLE DATA COLUMN TYPE The cert's public DESCRIPTION key size is incompatible with the security header's signature. The security header contains a signature that cannot be validated with the certificate's public key. This generally indicates that the certificate on the remote computer does not match the certificate in the database. COLUMN NUMBER FILTERABLE The table below lists the subclass values for this event class. ID SUBCLASS DESCRIPTION 1 No Security Header During a secure conversation, Service Broker received a message that did not contain a session key. Once a secure conversation is established, the dialog protocol requires that all messages in the conversation contain a session key. 2 No Certificate Service Broker could not locate a usable certificate for one of the participants in the conversation. To secure a conversation, the database must contain a certificate for both the sender and the recipient of the conversation. 3 Invalid Signature Broker could not verify the message signature supplied by the sender using the public key in the sender's certificate. This may indicate that the message is corrupt, that the message has been tampered with, that the remote service and the local service are not configured with the same user certificate, or that the certificate is out of date. 4 Run As Target Failure The destination user does not have receive permissions on the destination queue. To prevent unauthorized users from receiving messages, Service Broker does not enqueue messages with a destination user that cannot receive from the queue, regardless of whether the initiating user has permission to enqueue messages. See Also SQL Server Service Broker Audit Broker Login Event Class 3/24/2017 • 4 min to read • Edit Online SQL Server creates an Audit Broker Login event to report audit messages related to Service Broker transport security. Audit Broker Login Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar Unused in this event class. 10 Yes ClientProcessID int Unused in this event class. 9 Yes DatabaseID int SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int The type of event class captured. Always 159 for Audit Broker Login. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass int The type of event subclass, providing further information about each event class. The table below lists the event subclass values for this event. 21 Yes FileName nvarchar Remote broker authentication level. Supported authentication method configured on the remote broker endpoint. When more than one method is available, the accepting (target) 36 No DATA COLUMN TYPE endpoint determines DESCRIPTION which method is tried first. Possible values are: None. No authentication method is configured. NTLM. Requires NTLM authentication. KERBEROS. Requires Kerberos authentication. NEGOTIATE. Windows negotiates the authentication method. CERTIFICATE. Requires the certificate configured for the endpoint, which is stored in the master database. NTLM, CERTIFICATE. Accepts NTLM or SSL certificate authentication. KERBEROS, CERTIFICATE. Accepts Kerberos or the endpoint certificate authentication. NEGOTIATE, CERTIFICATE. Windows negotiates the authentication method or an endpoint certificate can be used for authentication. CERTIFICATE, NTLM. Accepts an endpoint certificate or NTLM for authentication. CERTIFICATE, KERBEROS. Accepts an endpoint certificate or Kerberos for authentication. CERTIFICATE, NEGOTIATE. Accepts an endpoint certificate for authentication or COLUMN NUMBER FILTERABLE DATA COLUMN TYPE HostName nvarchar IsSystem Windows negotiates DESCRIPTION the authentication method.. COLUMN NUMBER FILTERABLE Unused in this event class. 8 Yes int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The connect string used for this connection. 34 No OwnerName nvarchar Supported authentication method configured on the local broker endpoint. When more than one method is available, the accepting (target) endpoint determines which method is tried first. Possible values are: 37 No None. No authentication method is configured. NTLM. Requires NTLM authentication. KERBEROS. Requires Kerberos authentication. NEGOTIATE. Windows negotiates the authentication method. CERTIFICATE. DATA COLUMN TYPE Requires the DESCRIPTION certificate configured for the endpoint, which is stored in the master database. COLUMN NUMBER FILTERABLE NTLM, CERTIFICATE. Accepts NTLM or SSL certificate authentication. KERBEROS, CERTIFICATE. Accepts Kerberos or the endpoint certificate authentication. NEGOTIATE, CERTIFICATE. Windows negotiates the authentication method or an endpoint certificate can be used for authentication. CERTIFICATE, NTLM. Accepts an endpoint certificate or for NTLM authentication. CERTIFICATE, KERBEROS. Accepts an endpoint certificate or Kerberos for authentication. CERTIFICATE, NEGOTIATE. Accepts an endpoint certificate for authentication or Windows negotiates the authentication method.. ProviderName nvarchar The authentication method used for this connection 46 No RoleName nvarchar The role of the connection. This is either initiator or target. 38 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced. 30 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TargetUserName nvarchar Login state. One of: 39 No 4 No INITIAL WAIT LOGIN NEGOTIATE ONE ISC ONE ASC TWO ISC TWO ASC WAIT ISC Confirm WAIT ASC Confirm WAIT REJECT WAIT PRE-MASTER SECRET WAIT VALIDATION WAIT ARBITRATION ONLINE ERROR Note: ISC = Initiate Security Context. ASC = Accept Security Context TransactionID bigint The system-assigned ID of the transaction. The table below lists the subclass values for this event class. ID SUBCLASS DESCRIPTION 1 Login Success A Login Success event reports that the adjacent broker login process has finished successfully. 2 Login Protocol Error A Login Protocol Error event reports that the broker receives a message that is well-formed but not valid for the current state of the of the login process. The message may have been lost or sent out-of-sequence. ID SUBCLASS DESCRIPTION 3 Message Format Error A Message Format Error event reports that the broker received a message that does not match the expected format. The message may have been corrupted, or a program other than SQL Server may be sending messages to the port that Service Broker uses. 4 Negotiate Failure A Negotiate Failure event reports that the local broker and the remote broker support mutually exclusive levels of authentication. 5 Authentication Failure An Authentication Failure event reports that Service Broker cannot perform authentication for the connection due to an error. For Windows Authentication, this event reports that Service Broker is unable to use Windows Authentication. For certificate-based authentication, this event reports that Service Broker is unable to access the certificate. 6 Authorization Failure An Authorization Failure event reports that Service Broker denied authorization for the connection. For Windows Authentication, this event reports that the security identifier for the connection does not match a database user. For certificate-based authentication, this event reports that the public key delivered in the message does not correspond to a certificate in the database. See Also CREATE ENDPOINT (Transact-SQL) ALTER ENDPOINT (Transact-SQL) SQL Server Service Broker Audit Change Audit Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Change Audit event class occurs whenever an audit trace modification is made. Audit Change Audit Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes ColumnPermissions int Indicator of whether a column permission was set. Parse the statement text to determine which permissions were applied to which columns. 44 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 117. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 8 Yes 1=Audit started 2=Audit stopped 3=C2 mode ON 4=C2 mode OFF HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of Microsoft SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to Microsoft SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Change Database Owner Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Change Database Owner event class occurs when you use the ALTER AUTHORIZATION statement to change the owner of a database, and the permissions required to do that are checked. Audit Change Database Owner Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 152. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the even occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check). 23 Yes TargetLoginName nvarchar For actions that target a login, the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login, the security identification number (SID) of the targeted login. 43 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) ALTER AUTHORIZATION (Transact-SQL) Audit Database Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Management event class occurs when a database is created, altered, or dropped. Audit Database Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sysobjects table. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 means success of a permissions check and a value of 0 means a failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) CREATE DATABASE (SQL Server Transact-SQL) ALTER DATABASE (Transact-SQL) DROP DATABASE (Transact-SQL) Audit Database Mirroring Login Event Class 3/24/2017 • 4 min to read • Edit Online SQL Server creates an Audit Database Mirroring Login event to report audit messages related to database mirroring transport security. Audit Database Mirroring Login Event Class Data Columns DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE ApplicationName nvarchar Unused in this event class. 10 Yes ClientProcessID int Unused in this event class. 9 Yes DatabaseID int SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int The type of event class captured. Always 154 for Audit Database Mirroring Login. 27 No EventSequence int Sequence number for this event. 51 No EventSubClass int The type of event subclass, providing further information about each event class. The table below lists the event subclass values for this event. 21 Yes FileName nvarchar Supported authentication method configured on the remote database mirroring endpoint. When more than one method is available, the accepting (target) endpoint determines 36 No DATA COLUMN TYPE endpoint determines which method is tried DESCRIPTION first. Possible values are: None. No authentication method is configured. NTLM. Requires NTLM authentication. KERBEROS. Requires Kerberos authentication. NEGOTIATE. Windows negotiates the authentication method. CERTIFICATE. Requires the certificate configured for the endpoint, which is stored in the master database. NTLM, CERTIFICATE. Accepts NTLM or the endpoint certificate for authentication. KERBEROS, CERTIFICATE. Accepts Kerberos or the endpoint certificate for authentication. NEGOTIATE, CERTIFICATE. Windows negotiates the authentication method, or an endpoint certificate can be used for authentication. CERTIFICATE, NTLM. Accepts an endpoint certificate or NTLM for authentication. CERTIFICATE, KERBEROS. Accepts an endpoint certificate or Kerberos for authentication. CERTIFICATE, NEGOTIATE. Accepts an endpoint certificate for authentication or Windows negotiates COLUMN NUMBER FILTERABLE DATA COLUMN TYPE HostName nvarchar IsSystem the authentication DESCRIPTION method. COLUMN NUMBER FILTERABLE Unused in this event class. 8 Yes int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 No LoginSid image The security identification number (SID) of the logged-in user. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar The Windows domain to which the user belongs. 7 Yes NTUserName nvarchar The name of the user that owns the connection that generated this event. 6 Yes ObjectName nvarchar The connect string used for this connection. 34 No OwnerName nvarchar Supported authentication method configured on the local database mirroring endpoint. When more than one method is available, the accepting (target) endpoint determines which method is tried first. Possible values are: 37 No None. No authentication method is configured. NTLM. Requires NTLM authentication. KERBEROS. Requires Kerberos authentication. NEGOTIATE. Windows negotiates the authentication method. DATA COLUMN TYPE DESCRIPTION CERTIFICATE. Requires the certificate configured for the endpoint, which is stored in the master database. COLUMN NUMBER FILTERABLE NTLM, CERTIFICATE. Accepts NTLM or the endpoint certificate for authentication. KERBEROS, CERTIFICATE. Accepts Kerberos or the endpoint certificate for authentication. NEGOTIATE, CERTIFICATE. Windows negotiates the authentication method or an endpoint certificate can be used for authentication. CERTIFICATE, NTLM. Accepts an endpoint certificate or NTLM for authentication. CERTIFICATE, KERBEROS. Accepts an endpoint certificate or Kerberos for authentication. CERTIFICATE, NEGOTIATE. Accepts an endpoint certificate for authentication or Windows negotiates the authentication method. ProviderName nvarchar The authentication method used for this connection. 46 No RoleName nvarchar The role of the connection. This is either initiator or target. 38 No ServerName nvarchar The name of the instance of SQL Server being traced. 26 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE SPID int The server process ID assigned by SQL Server to the process associated with the client. 12 Yes StartTime datetime The time at which the event started, when available. 14 Yes State int Indicates the location within the SQL Server source code that produced the event. Each location that may produce this event has a different state code. A Microsoft support engineer can use this state code to find where the event was produced. 30 No DATA COLUMN TYPE DESCRIPTION COLUMN NUMBER FILTERABLE TargetUserName nvarchar Login state. One of: 39 No 4 No INITIAL WAIT LOGIN NEGOTIATE ONE ISC ONE ASC TWO ISC TWO ASC WAIT ISC Confirm WAIT ASC Confirm WAIT REJECT WAIT PRE-MASTER SECRET WAIT VALIDATION WAIT ARBITRATION ONLINE ERROR Note: ISC = Initiate Security Context. ASC = Accept Security Context. TransactionID bigint The system-assigned ID of the transaction. The table below lists the subclass values for this event class. ID SUBCLASS DESCRIPTION 1 Login Success A Login Success event reports that the adjacent database mirroring login process has finished successfully. 2 Login Protocol Error A Login Protocol Error event reports that the database mirroring login receives a message that is well-formed but not valid for the current state of the login process. The message may have been lost or sent out-of-sequence. ID SUBCLASS DESCRIPTION 3 Message Format Error A Message Format Error event reports that the database mirroring login received a message that does not match the expected format. The message may have been corrupted, or a program other than SQL Server may be sending messages to the port that database mirroring uses. 4 Negotiate Failure A Negotiate Failure event reports that the local database mirroring endpoint and the remote database mirroring endpoint support mutually exclusive levels of authentication. 5 Authentication Failure An Authentication Failure event reports that a database mirroring endpoint cannot perform authentication for the connection due to an error. For Windows Authentication, this event reports that the database mirroring endpoint is unable to use Windows Authentication. For certificate-based authentication, this event reports that the database mirroring endpoint is unable to access the certificate. 6 Authorization Failure An Authorization Failure event reports that a database mirroring endpoint denied authorization for the connection. For Windows Authentication, this event reports that the security identifier for the connection does not match a database user. For certificate-based authentication, this event reports that the public key delivered in the message does not correspond to a certificate in the master database. See Also CREATE ENDPOINT (Transact-SQL) ALTER ENDPOINT (Transact-SQL) Database Mirroring (SQL Server) Audit Database Object Access Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Object Access event class occurs when database objects, such as schemas, are accessed. Audit Database Object Access Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SQL Server Profiler Audit Database Object GDR Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Database Object GDR event class occurs when a GRANT, REVOKE, or DENY has been issued for database objects, such as assemblies and schemas. Audit Database Object GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 172. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Audit Database Object Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Object Management event class occurs when a CREATE, ALTER, or DROP statement is executed on database objects, such as schemas. NOTE Actions related to the public key are not audited. Audit Database Object Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 10=Open 11=Load 12=Access HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Database Object Take Ownership Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Object Take Ownership event class occurs when a change of owner for objects within database scope occurs. Audit Database Object Take Ownership Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. The value returned for this column is a combination of the corresponding value in the type column in the sys.objects catalog view and the values listed in ObjectType Trace Event Column. For example, if 8277-U is returned, the object type is user-defined table. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check. 23 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Audit Database Operation Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Operation event class occurs when operations in a database, such as checkpoint or subscribe query notification, occur. Audit Database Operation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Checkpoint 2=Subscribe to Query Notification HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Database Principal Impersonation Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Principal Impersonation event class occurs when an impersonation occurs within the database scope, such as EXECUTE AS <user> or SETUSER. Audit Database Principal Impersonation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) RequestID int ID of the request containing the statement. 49 Yes RoleName nvarchar Name of an application role being enabled. 38 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 means success of a permissions check and a value of 0 means a failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) EXECUTE AS Clause (Transact-SQL) SETUSER (Transact-SQL) Audit Database Principal Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Database Principal Management event class occurs when principals, such as users, are created, altered, or dropped from a database. Audit Database Principal Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Audit Database Scope GDR Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Database Scope GDR event class occurs whenever a GRANT, REVOKE, or DENY is issued for a statement permission by any user in Microsoft SQL Server for database-only actions such as granting permissions on a database. Audit Database Scope GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 102. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1=CREATE DATABASE 2=CREATE TABLE 4=CREATE PROCEDURE 8=CREATE VIEW 16=CREATE RULE 32=CREATE DEFAULT 64=BACKUP DATABASE 128=BACKUP LOG 256=BACKUP TABLE 512=CREATE FUNCTION RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext SQL text of the Grant/Revoke/Deny statement. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also SQL Server Profiler sp_trace_setevent (Transact-SQL) GRANT (Transact-SQL) REVOKE (Transact-SQL) DENY (Transact-SQL) Audit DBCC Event Class 3/24/2017 • 2 min to read • Edit Online The Audit DBCC event class occurs whenever a DBCC command is issued. Audit DBCC Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes ColumnPermissions int Indicator of whether a column permission was set. Parse the statement text to determine exactly which permissions were applied to which columns. 44 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar Issuer's username in the database. 40 Yes EventClass int Type of event = 116. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext SQL text of the DBCC command. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) DBCC (Transact-SQL) Audit Fulltext Event Class 3/24/2017 • 1 min to read • Edit Online The Audit Fulltext event class occurs when SQL Server connects to and communicates with the full-text filter daemon process. Audit Fulltext Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int The SQL Server error number, if this event reports an error. 31 Yes EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of connection used by the login. 1 = Nonpooled, 2 = Pooled. 21 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName int For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid int For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TextData ntext Text information about the Full-Text event. Typically this field provides information about the connection between the SQL Server process and the fulltext filter daemon process 1 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Login Change Password Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Login Change Password event class occurs whenever a user changes their Microsoft SQL Server login password. Audit Login Change Password Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 107. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Password self changed 2=Password changed 3=Password self reset 4=Password reset 5=Password unlocked 6=Password must change HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Login Change Property Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Login Change Property event class occurs when you use the sp_defaultdb stored procedure, the sp_defaultlanguage stored procedure, or the ALTER LOGIN statement to modify a property of a login. Audit Login Change Property Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 106. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Default database changed 2=Default language changed 3=Name changed 4=Credential changed 5=Policy changed 6=Expiration changed HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) sp_defaultdb (Transact-SQL) sp_defaultlanguage (Transact-SQL) Audit Login Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Login event class indicates that a user has successfully logged in to Microsoft SQL Server. Events in this class are fired by new connections or by connections that are reused from a connection pool. Audit Login Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Session level settings, including ANSI nulls, ANSI padding, cursor close on commit, null concatenation, and quoted identifiers. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 14. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of connection used by the login. 1 = Nonpooled, 2 = Pooled. 21 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Network packet size used. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. This event will always show success. 23 Yes TextData ntext Semicolon-delimited list of all set options. 1 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Login Failed Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Login Failed event class indicates that a user tried to log in to Microsoft SQL Server and failed. Events in this class are fired by new connections or by connections that are reused from a connection pool. Audit Login Failed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 20. 27 No EventSequence int The sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\username). 11 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. This event will always show failure. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Login GDR Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Login GDR event class occurs whenever a Microsoft Windows login right is added or removed. This event class is for the sp_grantlogin, sp_revokelogin, and sp_denylogin stored procedures. This event class may be removed in a future version of SQL Server. It is recommended that you use the Audit Server Principal Management event class instead. Audit Login GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 105. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image SID of the targeted login. 43 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) sp_grantlogin (Transact-SQL) sp_revokelogin (Transact-SQL) sp_denylogin (Transact-SQL) Audit Server Principal Management Event Class Audit Logout Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Logout event class indicates that a user has logged out of (logged off) Microsoft SQL Server. Events in this class are fired by new connections or by connections that are reused from a connection pool. Audit Logout Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes CPU int Amount of CPU time (in milliseconds) used by the user during their connection. 18 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Amount of time since the user logged in (approximately). 13 Yes EndTime datetime End time of the logout. 15 Yes EventClass int Type of event = 15. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of connection used by the login. 1 = Nonpooled, 2 = Pooled. 21 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes Reads bigint Number of logical read I/Os issued by the user during the connection. 16 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes Writes bigint Number of logical write I/Os issued by the user during the connection. 17 Yes GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes See Also sp_trace_setevent (Transact-SQL) Audit Object Derived Permission Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Object Derived Permission event class records when a CREATE, ALTER, or DROP command is issued for a specified object. This event only occurs if the object does not have permissions or owners directly associated with it. This event class may be removed in a future version of SQL Server. It is recommended that you use the Audit Schema Object Management event class instead. Audit Object Derived Permission Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar Issuer's user name in the database. 40 Yes EventClass int Type of event = 118. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object that is being created, altered, or dropped. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database username of the object owner of the object being created, altered, or dropped. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext SQL text of the statement. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Schema Object Management Event Class Audit Schema Object Access Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Schema Object Access event class occurs when an object permission (such as SELECT) is used. Audit Schema Object Access Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes ColumnPermissions int Indicates whether a column permission was set. Parse the statement text to determine which permissions were applied. 1=Yes, 0=No. 44 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar Issuer's username in the database. 40 Yes EventClass int Type of event = 114. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object whose permissions are being checked. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database username of the object owner of the object being targeted. 37 Yes ParentName nvarchar Name of the schema that the object is within. 59 Yes Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1=SELECT ALL 2=UPDATE ALL 4=REFERENCES ALL 8=INSERT 16=DELETE 32=EXECUTE (procedures only) DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName Nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check. 23 Yes TextData ntext SQL text of the statement. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Audit Schema Object GDR Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Schema Object GDR event class occurs whenever a GRANT, REVOKE, or DENY is issued for a schema object permission by any user in Microsoft SQL Server. Audit Schema Object GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes ColumnPermissions int Indicator of whether a column permission was set. Parse the statement text to determine exactly which permissions were applied to which columns. 1=Yes, 0=No. 44 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 103. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 8 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object that is the target of the grant/revoke/deny. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database username of the object owner of the object being targeted in the grant/revoke/deny. 37 Yes ParentName nvarchar Name of the schema the object is within. 59 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1=SELECT ALL 2=UPDATE ALL 4=REFERENCES ALL 8=INSERT 16=DELETE 32=EXECUTE (procedures only) 4096=SELECT ANY (at least one column) 8192=UPDATE ANY 16384=REFERENCES ANY RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) GRANT (Transact-SQL) REVOKE (Transact-SQL) DENY (Transact-SQL) Audit Schema Object Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Schema Object Management event class occurs when server objects are created, altered, or dropped. Audit Schema Object Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 8=Transfer 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes ParentName nvarchar Name of the schema the object is within. 59 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Schema Object Take Ownership Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Schema Object Take Ownership event class occurs when the permissions to change the owner of schema object (such as a table, procedure, or function) is checked. This happens when the ALTER AUTHORIZATION statement is used to assign an owner to an object. Audit Schema Object Take Ownership Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. The value returned for this column is a combination of the corresponding value in the type column in the sys.objects catalog view and the values listed in ObjectType Trace Event Column. 28 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerName nvarchar Database user name of the object owner. 37 Yes ParentName nvarchar Name of the schema that the object is in. 59 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) ALTER AUTHORIZATION (Transact-SQL) Audit Server Alter Trace Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Alter Trace event class occurs for all statements that check for the ALTER TRACE permission. Statements that check for ALTER TRACE include those used to create or configure a trace, or to set a filter on a trace. Audit Server Alter Trace Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates a failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Server Object GDR Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Server Object GDR event class occurs whenever a GRANT, REVOKE, or DENY is issued for a server object permission by any user in Microsoft SQL Server. Audit Server Object GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event=171 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either a SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) 4096 = SELECT ANY (at least one column) 8192 = UPDATE ANY RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also SQL Server Profiler sp_trace_setevent (Transact-SQL) GRANT (Transact-SQL) REVOKE (Transact-SQL) DENY (Transact-SQL) Audit Server Object Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Object Management event class occurs in the case of CREATE, ALTER, or DROP for server objects. Audit Server Object Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 7=Credential mapped to login 9=Credential Map Dropped 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also SQL Server Profiler sp_trace_setevent (Transact-SQL) Audit Server Object Take Ownership Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Server Object Take Ownership event class occurs when the owner is changed for objects in server scope. Audit Server Object Take Ownership Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. The value returned for this column is a combination of the corresponding value in the type column in the sys.objects catalog view and the values listed in ObjectType Trace Event Column. 28 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TargetUserName nvarchar For actions that target a database user (for example, granting permission to a user), the name of that user. 39 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Server Operation Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Operation event class occurs when Security Audit operations such as altering settings, resources, external access, or authorization are used. Audit Server Operation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Administer Bulk Operations 2=Alter Settings 3=Alter Resources 4=Authenticate 5=External Access 6=Alter Server State 7=Unsafe Assembly 8=Alter Connection 9=Alter Resource Governor 10=Use Any Workload Group 11=View Server State HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 means success of a permissions check and a value of 0 means a failure of that check. 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Server Principal Impersonation Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Principal Impersonation event class occurs when there is an impersonation within server scope, such as EXECUTE AS <login>. Audit Server Principal Impersonation Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 means success of a permissions check and a value of 0 means failure of that check. 23 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Server Principal Management Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Principal Management event class occurs when server principals are created, altered, or dropped. Audit Server Principal Management Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar SQL Server user name of the client. 40 Yes EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Create 2=Alter 3=Drop 4=Dump 5=Disable 6=Enable 11=Load HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Server Scope GDR Event Class 3/24/2017 • 3 min to read • Edit Online The Audit Server Scope GDR event class occurs when a GRANT, REVOKE, or DENY is issued for permissions in the server scope, such as creating a login. Audit Server Scope GDR Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DBUserName nvarchar SQL Server user name of the client. 40 Yes EventClass int Type of event = 170. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Grant 2=Revoke 3=Deny HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes OwnerName nvarchar Database user name of the object owner. 37 Yes Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1 = SELECT ALL 2 = UPDATE ALL 4 = REFERENCES ALL 8 = INSERT 16 = DELETE 32 = EXECUTE (procedures only) 4096 = SELECT ANY (at least one column) 8192 = UPDATE ANY RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TargetLoginName nvarchar For actions that target a login (for example, adding a new login), the name of the targeted login. 42 Yes TargetLoginSid image For actions that target a login (for example, adding a new login), the security identification number (SID) of the targeted login. 43 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) GRANT (Transact-SQL) REVOKE (Transact-SQL) DENY (Transact-SQL) Audit Server Starts and Stops Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Server Starts and Stops event class occurs when the Microsoft SQL Server service state is modified. Audit Server Starts and Stops Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes EventClass int Type of event = 18. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Shutdown 2=Started 3=Paused 4=Continue DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Manage the Database Engine Services Audit Statement Permission Event Class 3/24/2017 • 2 min to read • Edit Online The Audit Statement Permission event class occurs whenever a statement permission (such as CREATE TABLE) is used. The Audit Statement Permission event class may be removed from a future version of SQL Server. It is recommended that you use the Audit Schema Object Management event class instead. Audit Statement Permission Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DBUserName nvarchar Issuer's username in the database. 40 Yes EventClass int Type of event = 113. 27 No EventSequence int Sequence of a given event within the request. 51 No HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Permissions bigint Integer value representing the type of permissions checked. 19 Yes 1=CREATE DATABASE (master database only) 2=CREATE TABLE 4=CREATE PROCEDURE 8=CREATE VIEW 16=CREATE RULE 32=CREATE DEFAULT 64=BACKUP DATABASE 128=BACKUP LOG 256=BACKUP TABLE 512=CREATE FUNCTION RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure. For example, a value of 1 indicates success of a permissions check and a value of 0 indicates failure of that check. 23 Yes TextData ntext SQL text of the statement requiring statement permissions. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Audit Schema Object Management Event Class Server Event Category 3/24/2017 • 1 min to read • Edit Online The Server event category contains general server events. In This Section TOPIC DESCRIPTION Mount Tape Event Class Indicates that a tape mount request has been received. Server Memory Change Event Class Indicates that Microsoft SQL Server memory usage has changed. Trace File Close Event Class Indicates that a trace file has been closed during a trace file rollover. Mount Tape Event Class 3/24/2017 • 2 min to read • Edit Online The Mount Tape event class occurs when a tape mount request is received. Use this event class to monitor tape mount requests and their success or failure. Mount Tape Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a specified instance. SQL Server displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime For Mount Request events, the time of the mount time-out if a time-out occurs; otherwise, the time of the event itself (in such cases, StartTime indicates the time of the corresponding mount request). 15 Yes EventClass int Type of event = 195. 27 No EventSequence int The sequence of a specified event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1 = Tape mount request 2 = Tape mount complete 3 = Tape mount canceled GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the Session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext physical device name [ ( logical device name ) ]. The logical device name displays only if it is defined in the sys.backup_devices catalog view. 1 Yes See Also sp_trace_setevent (Transact-SQL) Back Up and Restore of SQL Server Databases Server Memory Change Event Class 3/24/2017 • 1 min to read • Edit Online The Server Memory Change event class occurs when Microsoft SQL Server memory usage has increased or decreased by either 1 megabyte (MB) or 5 percent of the maximum server memory, whichever is greater. Server Memory Change Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES EventClass int Type of event = 81. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Memory Increase 2=Memory Decrease IntegerData int New memory size, in megabytes (MB). 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Server Memory Server Configuration Options Trace File Close Event Class 3/24/2017 • 1 min to read • Edit Online The Trace File Close event class indicates that a trace file has been closed during a trace file rollover. Trace File Close Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 150. 27 No EventSequence int The unique timestamp of this event fired in this trace. This number increases monotonically for each event fired. 51 No FileName nvarchar The logical name of the trace file being closed. 36 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, NULL = user. The value is always 1 for this event class. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). The value is always "sa" for this event class. 11 Yes ObjectID int System-assigned ID of the trace. 22 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes See Also sp_trace_setevent (Transact-SQL) Sessions Event Category 3/24/2017 • 1 min to read • Edit Online The Sessions event category contains the ExistingConnection event class. In This Section TOPIC DESCRIPTION ExistingConnection Event Class Indicates properties of existing user connections when the trace was started. ExistingConnection Event Class 3/24/2017 • 2 min to read • Edit Online The ExistingConnection event class indicates the properties of existing user connections when the trace was started. The server raises one ExistingConnection event per existing user connection. Existing Connection Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary dump of option flags such as session level settings, including ANSI nulls, ANSI padding, cursor close on commit, null concatenation, and quoted identifiers. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int The current database ID of the user connection. ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 17. 27 No EventSequence int The sequence of this event within this trace. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int The network packet size in use for the connection. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, NULL = user. Always NULL for this event. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the user opened this connection (login time). 14 Yes TextData ntext Set options specific to the connection. 1 Yes See Also sp_trace_setevent (Transact-SQL) Audit Login Event Class Stored Procedures Event Category 3/24/2017 • 1 min to read • Edit Online The Stored Procedures event category contains general stored procedure events. In This Section TOPIC DESCRIPTION RPC:Completed Event Class Indicates that a remote procedure call (RPC) has been completed. PreConnect:Completed Event Class Indicates when the Resource Governor classifier function finishes execution. PreConnect:Starting Event Class Indicates when the Resource Governor classifier function starts execution. RPC Output Parameter Event Class Traces the output parameter values of remote procedure calls after execution. RPC:Starting Event Class Indicates that a remote procedure call is starting. SP:CacheHit Event Class Indicates that the stored procedure is in the cache. SP:CacheInsert Event Class Indicates that the stored procedure has been brought into the cache. SP:CacheMiss Event Class Indicates that the stored procedure was not found in the cache. SP:CacheRemove Event Class Indicates that the stored procedure has been removed from the cache. SP:Completed Event Class Indicates that execution of the stored procedure has completed. SP:Recompile Event Class Indicates that the stored procedure has been recompiled. SP:Starting Event Class Indicates that execution of the stored procedure is starting. SP:StmtCompleted Event Class Indicates that a Transact-SQL statement within a stored procedure has completed. SP:StmtStarting Event Class Indicates that a Transact-SQL statement within a stored procedure has started. See Also Extended Events sp_trace_setevent (Transact-SQL) PreConnect:Completed Event Class 3/24/2017 • 1 min to read • Edit Online The PreConnect:Completedevent class indicates when a LOGON trigger or the Resource Governor classifier function finishes execution. PreConnect:Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int 216 27 No SPID int The ID of server process that fires this event. 12 Yes EventSubClass int 1 for the user-defined classifier function. 21 Yes StartTime datetime The time when the user-defined classifier function starts. 14 Yes EndTime datetime The time when the user-defined classifier function starts. 15 Yes Duration bigint The amount of time, in microseconds, used by the classifier function. 13 Yes ObjectID int The ID of the userdefined classifier object. 22 Yes CPU int CPU usage in milliseconds. 18 Yes Reads int The number of logical reads. 16 Yes Writes int The number of logical writes. 17 Yes GroupID int The ID of the classified workload group. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int The last error number if the user-defined classifier function fails to execute. 31 Yes State int The state of the last error. 30 Yes TargetUserName sysname The return value (workload group name) for the userdefined classifier function if the system can not find a corresponding active group. Otherwise, this column is set to NULL. 39 Yes ObjectName nvarchar(256) The two-part name of the classifier userdefined function. For example, dbo.classifier. 34 Yes See Also Extended Events PreConnect:Starting Event Class Resource Governor PreConnect:Starting Event Class 3/24/2017 • 1 min to read • Edit Online The PreConnect:Starting event class indicates when a LOGON trigger or the Resource Governor classifier function starts execution. PreConnect:Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int 215 27 No SPID int The ID of server process that fires this event. 12 Yes EventSubClass int 1 for the user-defined classifier function. 21 Yes StartTime datetime The time when the user-defined classifier function starts. 14 Yes ObjectID int The ID of the userdefined classifier object. 22 Yes ObjectName nvarchar(256) The two-part name of the classifier userdefined function. For example, dbo.classifier. 34 Yes See Also Extended Events PreConnect:Completed Event Class Resource Governor RPC:Completed Event Class 3/24/2017 • 3 min to read • Edit Online The RPC:Completed event class indicates that a remote procedure call has been completed. RPC:Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes CPU int Amount of CPU time used by the event. In microseconds beginning with SQL Server 2012. In milliseconds in earlier versions. 18 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Amount of time taken by the event. In microseconds beginning with SQL Server 2008 R2. In milliseconds in earlier versions. 13 Yes EndTime datetime Time at which the remote procedure call ended. 15 Yes Error int Error number of a given event. 31 Yes 0=OK 1=Error 2=Abort 3=Skipped EventClass int Type of event = 10. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes Reads bigint Number of page reads issued by the remote procedure call. 16 Yes RequestID int ID of the request containing the statement. 49 Yes RowCounts bigint Number of rows in the RPC batch. 48 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID ServerName nvarchar Name of the instance of SQL Server being traced. 26 SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the remote procedure call. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes Writes bigint Number of page writes issued by the remote procedure call. 17 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) FILTERABLE RPC Output Parameter Event Class 3/24/2017 • 2 min to read • Edit Online The RPC Output Parameter event class traces the output parameter values of remote procedure calls (RPCs) after execution. Use this class to examine the output values returned by stored procedures. For example, if an application is not producing the expected output values after executing a remote procedure call, you can use this event class to help isolate the problem between the client code and the server code. RPC Output Parameter Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 100. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectName nvarchar The name of the parameter being referenced. 34 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Output parameter values of the RPC. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) RPC:Starting Event Class 3/24/2017 • 2 min to read • Edit Online The RPC:Starting event class indicates that a remote procedure call has started. RPC:Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 11. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectName nvarchar Name of the object being referenced. 34 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1; while LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the remote procedure call. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SP:CacheHit Event Class 3/24/2017 • 2 min to read • Edit Online The SP:CacheHit event class indicates that a stored procedure is in the plan cache. SP:CacheHit Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 38. 27 No EventSequence int The sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int 1=Execution Context Hit: A free execution plan was found in the plan cache. 21 Yes 2=Compplan Hit: A compiled plan was found in the plan cache. GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int System-assigned ID of the stored procedure found in the cache. 22 Yes ObjectName nvarchar Name of the object that was found in the cache. If ObjectName is populated, TextData will not be populated. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Text of the SQL code that was found in the cache. If TextData is populated, ObjectName will not be populated. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SP:CacheInsert Event Class 3/24/2017 • 2 min to read • Edit Online The SP:CacheInsert event class indicates that the stored procedure has been inserted into the procedure cache. SP:CacheInsert Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 35. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the stored procedure. 22 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column will display both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the SQL code that is being cached. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SP:CacheMiss Event Class SP:CacheMiss Event Class 3/24/2017 • 2 min to read • Edit Online The SP:CacheMiss event class indicates that the procedure is not found in the cache. If the SP:CacheMiss event class occurs frequently, it can indicate that more memory should be made available to Microsoft SQL Server, thereby increasing the size of the procedure cache. SP:CacheMiss Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes EventClass int Type of event = 34. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the stored procedure. If ObjectName is populated, then TextData will not be populated. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the SQL code that is being cached. If TextData is populated, ObjectName is not populated. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SP:CacheInsert Event Class SP:CacheRemove Event Class 3/24/2017 • 2 min to read • Edit Online The SP:CacheRemove event class indicates that the stored procedure has been removed from the plan cache. SP:CacheRemove Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 36. 27 No EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 1=Compplan Remove: A compiled query plan has been removed from the cache. 2=Proc Cache Flush: All entries have been removed from the procedure cache. GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the stored procedure. 22 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the SQL being removed from the cache. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SP:Completed Event Class 3/24/2017 • 2 min to read • Edit Online The SP:Completed event class indicates that the stored procedure has completed executing. SP:Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting. 15 Yes EventClass int Type of event = 43. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the line number of the execute statement that called this stored procedure. 5 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Nesting level of the stored procedure. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the stored procedure. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Type of stored procedure called. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes RowCounts bigint Number of rows for all statements within this stored procedure. 48 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SourceDatabaseID int ID of the database the object exists in. 62 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Text of the stored procedure call. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SP:Recompile Event Class 3/24/2017 • 3 min to read • Edit Online The SP:Recompile event class indicates that a stored procedure, trigger, or user-defined function has been recompiled. Recompilations reported by this event class occur at the statement level. The preferred way to trace statement-level recompilations is to use the SQL:StmtRecompile event class. The SP:Recompile event class is deprecated. For more information, see SQL:StmtRecompile Event Class. SP:Recompile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 37. 27 No EventSequence int The sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. Indicates the reason for recompilation. 21 Yes 1 = Schema Changed 2 = Statistics Changed 3 = Recompile DNR 4 = Set Option Changed 5 = Temp Table Changed 6 = Remote Rowset Changed 7 = For Browse Perms Changed 8 = Query Notification Environment Changed 9 = MPI View Changed 10 = Cursor Options Changed 11 = With Recompile Option GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IntegerData2 int Ending offset of the statement within the stored procedure or batch that caused recompilation. Ending offset is -1 if the statement is the last statement in its batch. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int The nesting level of the stored procedure. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the stored procedure. 22 Yes ObjectName nvarchar Name of the object that triggered the recompile. 34 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectType int Value that represents the type of object involved in the event. For more information, see ObjectType Trace Event Column. 28 Yes Offset int Starting offset of the statement within the stored procedure or batch that caused recompilation. 61 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes SqlHandle varbinary 64-bit hash based on the text of an ad hoc query or the database and object ID of an SQL object. This value can be passed to sys.dm_exec_sql_text to retrieve the associated SQL text. 63 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TextData ntext Text of the TransactSQL statement that caused a statementlevel recompilation. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SQL:StmtRecompile Event Class SP:Starting Event Class 3/24/2017 • 2 min to read • Edit Online The SP:Starting event class indicates that a stored procedure is beginning execution. SP:Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 42. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the line number of the execute statement that called this stored procedure. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Nesting level of the stored procedure. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the stored procedure. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectName nvarchar Name of the stored procedure being started. 34 Yes ObjectType int The type of stored procedure being started. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SourceDatabaseID int ID of the database the object exists in. 62 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the procedure call. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SP:StmtCompleted Event Class 3/24/2017 • 3 min to read • Edit Online The SP:StmtCompleted event class indicates that a Transact-SQL statement within a stored procedure has completed. SP:StmtCompleted Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes CPU int Amount of CPU time (in milliseconds) used by the event. 18 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EndTime datetime Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting. 15 Yes EventClass int Type of event = 45. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Integer value dependent on the event class captured in the trace. 25 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Line number of the statement being executed. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes Reads bigint Number of logical disk reads performed by the server on behalf of the event. 16 Yes RequestID int ID of the request containing the statement. 49 Yes RowCounts bigint The number of rows affected by an event. 48 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SourceDatabaseID int The ID of the database the object exists in. 62 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes Writes bigint Number of physical disk writes performed by the server on behalf of the event. 17 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SP:StmtStarting Event Class 3/24/2017 • 2 min to read • Edit Online The SP:StmtStarting event class indicates that a Transact-SQL statement within a stored procedure has started. SP:StmtStarting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventClass int Type of event = 44. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Line number of the statement being executed. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Integer representing the data returned by @@NESTLEVEL. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectID int System-assigned ID of the object. 22 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectName nvarchar Name of the object being referenced. 34 Yes ObjectType int Value representing the type of the object involved in the event. This value corresponds to the type column in the sys.objects catalog view. For values, see ObjectType Trace Event Column. 28 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SourceDatabaseID int ID of the database the object exists in. 62 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE State int Indicates if the execution of the statement is occurring after a recompile. 30 Yes 1=Recompiled TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Transactions Event Category 3/24/2017 • 1 min to read • Edit Online The Transactions event classes can be used to monitor the status of transactions. The event class names that are prefixed with TM: are used to track the transaction-related operations that are sent through the transaction management interface. In This Section TOPIC DESCRIPTION DTCTransaction Event Class Tracks transactions coordinated by the Microsoft Distributed Transaction Coordinator (MS DTC). These are transactions distributed between two or more databases or instances of the SQL Server Database Engine. SQLTransaction Event Class Tracks Transact-SQL BEGIN TRAN, COMMIT TRAN, SAVE TRAN, and ROLLBACK TRAN statements. TM: Begin Tran Completed Event Class Indicates that a BEGIN TRANSACTION request has completed. TM: Begin Tran Starting Event Class Indicates that a BEGIN TRANSACTION request is starting. TM: Commit Tran Completed Event Class Indicates that a COMMIT TRANSACTION request has completed. TM: Commit Tran Starting Event Class Indicates that a COMMIT TRANSACTION request is starting. TM: Promote Tran Completed Event Class Indicates that a PROMOTE TRANSACTION request has completed. TM: Promote Tran Starting Event Class Indicates that a PROMOTE TRANSACTION request is starting. TM: Rollback Tran Completed Event Class Indicates that a ROLLBACK TRANSACTION request has completed. TM: Rollback Tran Starting Event Class Indicates that a ROLLBACK TRANSACTION request is starting. TM: Save Tran Completed Event Class Indicates that a SAVE TRANSACTION request has completed. TM: Save Tran Starting Event Class Indicates that a SAVE TRANSACTION request is starting. TransactionLog Event Class Tracks when transactions are written to a database transaction log. DTCTransaction Event Class 3/24/2017 • 2 min to read • Edit Online Use the DTCTransaction event class to monitor the state of SQL Server Database Engine transactions coordinated through Microsoft Distributed Transaction Coordinator (DTC). This includes transactions involving two or more databases in the same instance of the Database Engine, or distributed transactions involving two or more instances of the Database Engine. DTCTransaction Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary representation of the Unit of Work ID (UOW) that uniquely identifies this transaction within DTC. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 19. 27 No EventSequence int Sequence of a given event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Type of event subclass. 21 Yes 0=Get address 1=Propagate Transaction 3=Close connection 6=Creating a new DTC transaction 7=Enlisting in a DTC transaction 9=Internal commit 10=Internal abort 14=Preparing Transaction 15=Transaction is prepared 16=Transaction is aborting 17=Transaction is committing 22=TM failed while in prepared state 23=Unknown GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Isolation level of the transaction. 25 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principal s catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Textual representation of the UOW that uniquely identifies this transaction within DTC. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SQLTransaction Event Class 3/24/2017 • 2 min to read • Edit Online Use the SQLTransaction event class to monitor when transactions begin and are completed, especially when you test applications, triggers, or stored procedures. SQLTransaction Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. 15 Yes EventClass int Type of event = 50. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 0=Begin 1=Commit 2=Rollback 3=Savepoint GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int 0 = System transaction. 25 Yes 60 Yes 1 = User transaction. IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes ObjectName nvarchar Name of the object being referenced. 34 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) TM: Begin Tran Completed Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Begin Tran Completed event class indicates that a BEGIN TRANSACTION request has been completed. The request was sent from the client through the transaction management interface. TM: Begin Tran Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 182. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes Success int 1 = success. 0 = failure (for example, a 1 means success of a permissions check and a 0 means a failure of that check). 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) BEGIN TRANSACTION (Transact-SQL) TM: Begin Tran Starting Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Begin Tran Starting event class indicates that a BEGIN TRANSACTION request is starting. The request is sent from the client through the transaction management interface. TM: Begin Tran Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 181. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) BEGIN TRANSACTION (Transact-SQL) TM: Commit Tran Completed Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Commit Tran Completed event class indicates that a COMMIT TRANSACTION request completed. The request was sent from the client through the transaction management interface. The EventSubClass column indicates if a new transaction will be started after the current transaction is committed. TM: Commit Tran Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 186. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Commit 2=Commit and Begin GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure (for example, a 1 means success of a permissions check and a 0 means a failure of that check). 23 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID YES TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events COMMIT TRANSACTION (Transact-SQL) sp_trace_setevent (Transact-SQL) TM: Commit Tran Starting Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Commit Tran Starting event class indicates that a COMMIT TRANSACTION request is starting. The request is sent from the client through the transaction management interface. The EventSubClass column indicates if a new transaction will be started after the current transaction is committed. TM: Commit Tran Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 185. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Commit 2=Commit and Begin GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also COMMIT TRANSACTION (Transact-SQL) sp_trace_setevent (Transact-SQL) TM: Promote Tran Completed Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Promote Tran Completed event class indicates that a PROMOTE TRANSACTION request has completed. The request is sent from the client through the transaction management interface. TM: Promote Tran Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image DTC Xact Token. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 184. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure (for example, a 1 means success of a permissions check and a 0 means a failure of that check). 23 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) TM: Promote Tran Starting Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Promote Tran Starting event class indicates that a PROMOTE TRANSACTION request is starting. The request is sent from the client through the transaction management interface. TM: Promote Tran Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 183. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) TM: Rollback Tran Completed Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Rollback Tran Completed event class indicates that a ROLLBACK TRANSACTION request completed. The request was sent from the client through the transaction management interface. The EventSubClass column indicates if a new transaction will be started after the current transaction is rolled back. TM: Rollback Tran Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages table. 31 Yes EventClass int Type of event = 188. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Rollback 2=Rollback and Begin GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure (for example, a 1 indicates that a permissions check was successful and a 0 indicates that the check failed). 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events ROLLBACK TRANSACTION (Transact-SQL) sp_trace_setevent (Transact-SQL) TM: Rollback Tran Starting Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Rollback Tran Starting event class indicates that a ROLLBACK TRANSACTION request is starting. The client sends the request through the transaction management interface. The EventSubClass column indicates if a new transaction will be started after the current transaction is rolled back. TM: Rollback Tran Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 187. 27 No EventSequence int The sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes 1=Rollback 2=Rollback and Begin GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also ROLLBACK TRANSACTION (Transact-SQL) sp_trace_setevent (Transact-SQL) TM: Save Tran Completed Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Save Tran Completed event class indicates that a SAVE TRANSACTION request has completed. The request was sent from the client through the transaction management interface. TM: Save Tran Completed Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE Error int Error number of a given event. Often this is the error number stored in the sys.messages catalog view. 31 Yes EventClass int Type of event = 192. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes Success int 1 = success. 0 = failure (for example, a 1 means success of a permissions check and a 0 means a failure of that check). 23 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SAVE TRANSACTION (Transact-SQL) TM: Save Tran Starting Event Class 3/24/2017 • 2 min to read • Edit Online The TM: Save Tran Starting event class indicates that a SAVE TRANSACTION request is starting. The request is sent from the client through a transaction management interface. TM: Save Tran Starting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 191. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar The login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events SAVE TRANSACTION (Transact-SQL) sp_trace_setevent (Transact-SQL) TransactionLog Event Class 3/24/2017 • 2 min to read • Edit Online Use the TransactionLog event class to monitor activity in the transaction logs in an instance of the SQL Server Database Engine. TransactionLog Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process. 9 Yes DatabaseID int ID of the database where the data is being logged. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 54. 27 No EventSequence int Sequence of a given event within the request. 51 No EventSubClass int Type of event subclass. 21 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IndexID int ID for the index on the object affected by the event. To determine the index ID for an object, use the index_id column of the sys.indexes catalog view. 24 Yes IntegerData int Integer value dependent on the event class captured in the trace. 25 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int System-assigned ID of the object. 22 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also sp_trace_setevent (Transact-SQL) The Transaction Log (SQL Server) TSQL Event Category 3/24/2017 • 1 min to read • Edit Online The TSQL event category contains general TSQL events. In This Section TOPIC DESCRIPTION Exec Prepared SQL Event Class Indicates that the SqlClient, ODBC, OLE DB, or DB-Library has executed a prepared Transact-SQL statement or statements. Prepare SQL Event Class Indicates that SqlClient, ODBC, OLE DB, or DB-Library has prepared a Transact-SQL statement or statements for use. SQL:BatchCompleted Event Class Indicates that the Transact-SQL batch has completed. SQL:BatchStarting Event Class Indicates that the Transact-SQL batch is starting. SQL:StmtCompleted Event Class Indicates that a Transact-SQL statement has completed. SQL:StmtRecompile Event Class Indicates statement-level recompilations caused by all types of batches: stored procedures, triggers, ad hoc batches, and queries. SQL:StmtStarting Event Class Indicates that a Transact-SQL statement is starting. Unprepare SQL Event Class Indicates that the SqlClient, ODBC, OLE DB, or DB-Library has deleted a prepared Transact-SQL statement or statements. XQuery Static Type Event Class Occurs when SQL Server executes an XQuery expression. See Also Transact-SQL Reference (Database Engine) Exec Prepared SQL Event Class 3/24/2017 • 2 min to read • Edit Online The Exec Prepared SQL event class indicates that the SqlClient, ODBC, OLE DB, or DB-Library has executed a prepared Transact-SQL statement or statements. Exec Prepared SQL Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 72. 27 EventSequence int Sequence of a given event within the request. 51 GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the prepared SQL statement. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) Prepare SQL Event Class 3/24/2017 • 2 min to read • Edit Online The Prepare SQL event class indicates that SqlClient, ODBC, OLE DB, or DB-Library has prepared a Transact-SQL statement or statements for use. Prepare SQL Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 71. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the prepared TransactSQL statement. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token used to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SQL:BatchCompleted Event Class 3/24/2017 • 2 min to read • Edit Online The SQL:BatchCompleted event class indicates that the Transact-SQL batch has completed. SQL:BatchCompleted Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes CPU int Amount of CPU time (in milliseconds) used by the batch. 18 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting. 15 Yes Error int Error number of the event. 31 Yes 0=OK 1=Error 2=Abort EventClass int Type of event = 12. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes Reads bigint Number of page read I/Os caused by the batch. 16 Yes RequestID int ID of the request containing the statement. 49 Yes RowCounts bigint Number of rows affected by an event. 48 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the batch. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes Writes bigint Number of page write I/Os caused by the batch. 17 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) SQL:BatchStarting Event Class 3/24/2017 • 2 min to read • Edit Online The SQL:BatchStarting event class indicates that a Transact-SQL batch is starting. SQL:BatchStarting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 13. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, when available. 14 Yes TextData ntext Text of the TransactSQL batch. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SQL:StmtCompleted Event Class 3/24/2017 • 3 min to read • Edit Online The SQL:StmtCompleted event class indicates that a Transact-SQL statement has completed. SQL:StmtCompleted Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes CPU int Amount of CPU time (in milliseconds) used by the event. 18 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes Duration bigint Amount of time (in microseconds) taken by the event. 13 Yes EndTime datetime Time at which the event ended. 15 Yes EventClass int Type of event = 41. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData int Number of rows returned by the statement. 25 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Line number of the statement being executed. 5 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int The nest level of the stored procedure if the statement was run within a stored procedure. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes Reads bigint Number of page reads issued by the SQL statement. 16 Yes RequestID int ID of the request containing the statement. 49 Yes RowCounts bigint Number of rows affected by an event. 48 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the statement that was executed. 1 Yes TransactionID bigint ID of the transaction if the statement was run within a transaction. 4 Yes Writes bigint Number of page writes issued by the SQL statement. 17 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) SQL:StmtRecompile Event Class 3/24/2017 • 3 min to read • Edit Online The SQL:StmtRecompile event class indicates statement-level recompilations caused by all types of batches: stored procedures, triggers, ad hoc batches, and queries. Queries can be submitted by using sp_executesql, dynamic SQL, Prepare methods, Execute methods, or similar interfaces. The SQL:StmtRecompile event class should be used instead of the SP:Recompile event class. SQL:StmtRecompile Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of Microsoft SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the process ID. 9 Yes DatabaseID int ID of the database in which the stored procedure is running. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the stored procedure is running. 35 Yes EventSequence int The sequence of an event within the request. 51 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSubClass int Describes the cause of the recompilation: 21 Yes 1 = Schema changed 2 = Statistics changed 3 = Deferred compile 4 = Set option changed 5 = Temp table changed 6 = Remote rowset changed 7 = For Browse permissions changed 8 = Query notification environment changed 9 = Partition view changed 10 = Cursor options changed 11 = Option (recompile) requested GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running which submitted this statement. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int Ending offset of the statement within the stored procedure or batch that caused recompilation. Ending offset is -1 if the statement is the last statement in its batch. 55 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE IsSystem int Indicates whether the event occurred on a system process or a user process. 60 Yes 1 = system 0 = user LineNumber int Sequence number of this statement within the batch, if applicable. 5 Yes LoginName nvarchar Name of the login that submitted this batch. 11 Yes LoginSid image Security identifier (SID) of the currently logged in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int The nesting level of the stored procedure call. For example, my_proc_a stored procedure calls my_proc_b. In this case, my_proc_a has a NestLevel of 1, my_proc_b has a NestLevel of 2. 29 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name of connected user. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ObjectID int System-assigned identifier of the object that contains the statement that caused the recompilation. This object can be a stored procedure, trigger, or user-defined function. For ad hoc batches or prepared SQL, ObjectID and ObjectName return a NULL value. 22 Yes ObjectName nvarchar Name of the object identified by ObjectID. 34 Yes ObjectType int Value that represents the type of object involved in the event. For more information, see ObjectType Trace Event Column. 28 Yes Offset int Starting offset of the statement within the stored procedure or batch that caused recompilation. 61 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int Server process ID of the connection. 12 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE SqlHandle varbinary 64-bit hash based on the text of an ad hoc query or the database and object ID of an SQL object. This value can be passed to sys.dm_exec_sql_text to retrieve the associated SQL text. 63 No StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text of the TransactSQL statement that recompiled. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also SP:Recompile Event Class sp_trace_setevent (Transact-SQL) SQL:StmtStarting Event Class 3/24/2017 • 2 min to read • Edit Online The SQL:StmtStarting event class indicates that a Transact-SQL statement has started. SQL:StmtStarting Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 40. 27 No DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IntegerData2 int End offset (in bytes) of the statement that is being executed. 55 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Line number of the statement being executed. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NestLevel int Nest level of the stored procedure if the SQL statement was run within a stored procedure. 29 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes Offset int Starting offset of the statement within the stored procedure or batch. 61 Yes RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes State int Indicates if the execution of the statement is occurring after a recompile. 30 Yes 1 Yes 1=Recompiled TextData ntext Text of the statement that is about to be executed. DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint ID of the transaction if the statement was run within a transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also Extended Events sp_trace_setevent (Transact-SQL) Unprepare SQL Event Class 3/24/2017 • 2 min to read • Edit Online The Unprepare SQL event class indicates that the SqlClient, ODBC, OLE DB, or DB-Library has unprepared (deleted) a prepared Transact-SQL statement or statements. Unprepare SQL Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 73. 27 No EventSequence int Sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes Handle int Handle of the prepared TransactSQL statement. 33 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LoginName nvarchar Name of the login of the user (either the SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_princiapls catalog. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE RequestID int ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token to describe the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) XQuery Static Type Event Class 3/24/2017 • 2 min to read • Edit Online The XQuery Static Type event class occurs when SQL Server executes an XQuery expression. This event class provides the static type of the XQuery expression. XQuery Static Type Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE EventClass int Type of event = 198. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes LineNumber int Displays the number of the line containing the error. 5 Yes LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes MethodName nvarchar Name of the OLE DB method. 47 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes ServerName nvarchar Name of the instance of SQL Server being traced. 26 No SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext The statically inferred type of the XQuery expression. 1 Yes TransactionID bigint System-assigned ID of the transaction. 4 Yes XactSequence bigint Token that describes the current transaction. 50 Yes See Also sp_trace_setevent (Transact-SQL) User-Configurable Event Category 3/24/2017 • 1 min to read • Edit Online The User-Configurable event category contains the User-Configurable event classes. In This Section TOPIC DESCRIPTION User-Configurable Event Class Used to monitor user-defined events that cannot be monitored by the system-supplied events in other event categories. User-Configurable Event Class 3/24/2017 • 2 min to read • Edit Online Use the User-Configurable event category to monitor user-defined events. Create user-defined event classes to monitor events that cannot be monitored by the system-supplied event classes in other event categories. For example, a user-defined event can be created to monitor the progress of the application you are testing. As the application runs, it can generate events at predefined points, allowing you to determine the current execution point in your application. User-Configurable Event Class Data Columns DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE ApplicationName nvarchar Name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program. 10 Yes BinaryData image Binary value dependent on the event class captured in the trace. 2 Yes ClientProcessID int ID assigned by the host computer to the process where the client application is running. This data column is populated if the client provides the client process ID. 9 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE DatabaseID int ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function. 3 Yes DatabaseName nvarchar Name of the database in which the user statement is running. 35 Yes EventClass int Type of event = 8291. 27 No EventSequence int The sequence of a given event within the request. 51 No GroupID int ID of the workload group where the SQL Trace event fires. 66 Yes HostName nvarchar Name of the computer on which the client is running. This data column is populated if the client provides the host name. To determine the host name, use the HOST_NAME function. 8 Yes IsSystem int Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user. 60 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE LoginName nvarchar Name of the login of the user (either SQL Server security login or the Microsoft Windows login credentials in the form of DOMAIN\username). 11 Yes LoginSid image Security identifier (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server. 41 Yes NTDomainName nvarchar Windows domain to which the user belongs. 7 Yes NTUserName nvarchar Windows user name. 6 Yes RequestID int The ID of the request containing the statement. 49 Yes SessionLoginName nvarchar Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins. 64 Yes SPID int ID of the session on which the event occurred. 12 Yes StartTime datetime Time at which the event started, if available. 14 Yes TextData ntext Text value dependent on the event class captured in the trace. 1 Yes DATA COLUMN NAME DATA TYPE DESCRIPTION COLUMN ID FILTERABLE TransactionID bigint System-assigned ID of the transaction. 4 Yes See Also SQL Server Profiler sp_trace_setevent (Transact-SQL) sp_trace_generateevent (Transact-SQL) ObjectType Trace Event Column 3/24/2017 • 1 min to read • Edit Online The Object Type trace event column is used in a variety of trace events. This topic describes the possible values of this column and their associated definitions. Object Type Column Values VALUE DEFINITION 8259 Check Constraint 8260 Default (constraint or standalone) 8262 Foreign-key Constraint 8272 Stored Procedure 8274 Rule 8275 System Table 8276 Trigger on Server 8277 (User-defined) Table 8278 View 8280 Extended Stored Procedure 16724 CLR Trigger 16964 Database 16975 Object 17222 FullText Catalog 17232 CLR Stored Procedure 17235 Schema 17475 Credential 17491 DDL Event 17741 Management Event 17747 Security Event VALUE DEFINITION 17749 User Event 17985 CLR Aggregate Function 17993 Inline Table-valued SQL Function 18000 Partition Function 18002 Replication Filter Procedure 18004 Table-valued SQL Function 18259 Server Role 18263 Microsoft Windows Group 19265 Asymmetric Key 19277 Master Key 19280 Primary Key 19283 ObfusKey 19521 Asymmetric Key Login 19523 Certificate Login 19538 Role 19539 SQL Login 19543 Windows Login 20034 Remote Service Binding 20036 Event Notification on Database 20037 Event Notification 20038 Scalar SQL Function 20047 Event Notification on Object 20051 Synonym 20307 Sequence 20549 End Point VALUE DEFINITION 20801 Adhoc Queries which may be cached 20816 Prepared Queries which may be cached 20819 Service Broker Service Queue 20821 Unique Constraint 21057 Application Role 21059 Certificate 21075 Server 21076 Transact-SQL Trigger 21313 Assembly 21318 CLR Scalar Function 21321 Inline scalar SQL Function 21328 Partition Scheme 21333 User 21571 Service Broker Service Contract 21572 Trigger on Database 21574 CLR Table-valued Function 21577 Internal Table (For example, XML Node Table, Queue Table.) 21581 Service Broker Message Type 21586 Service Broker Route 21587 Statistics 21825 User 21827 21831 21843 21847 22099 Service Broker Service VALUE DEFINITION 22601 Index 22604 Certificate Login 22611 XMLSchema 22868 Type See Also sp_trace_setevent (Transact-SQL)