SQL OLEDB Provider Events for Visual Studio Analyzer

   

The SQL OLE DB Provider version 7.0 is capable of generating Visual Studio Analyzer events. You can use these events to:

Other Microsoft-supplied technologies are also capable of generating Visual Studio Analyzer events; see Microsoft Components That Generate Visual Studio Analyzer Events for a complete list.

Visual Studio Analyzer Events Generated by the SQL OLE DB Provider

Event Event description Event data
ComponentStart Indicates the start of a component that is a source of Visual Studio Analyzer events. You can match this event with a ComponentStop event to measure the time a component was active or to make sure that components start and stop as expected. Unique identifier for the component in the form of a GUID.
ComponentStop Indicates the stop of a component that is a source of Visual Studio Analyzer events. You can match this event with a ComponentStart event to measure the time a component was active or to make sure that components start and stop as expected. Unique identifier for the component in the form of a GUID.
TransactionStart Indicates the start of a transaction. You can match this event with a TransactionCommit or TransactionRollback event to measure how long the transaction took to complete or the success or failure of the transaction. Source machine, process, and thread to uniquely identify the machine where the transaction is taking place.

Unique identifier for the event in the form of a GUID.

Correlation ID, for use in matching with TransactionCommit or TransactionRollback events.

IsolationLevel, for indicating which level of changes made by other transactions can be seen.

TransactionCommit Indicates the recording of a transaction. A transaction is recorded, or committed, only if all parts of it complete successfully. You can match this event with a TransactionStart event to measure how long the transaction took. Source machine, process, and thread to uniquely identify the machine where the transaction is taking place.

Unique identifier for the event in the form of a GUID.

Correlation ID, for use in matching with TransactionStart events.

Retain value, for indicating whether a new transaction will be started as soon as this transaction is committed.

Return code, the return value for the Commit event. The return value can be any of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

TransactionRollback Indicates the rolling back of a transaction. A transaction is rolled back (undone) if one or more of its parts fails. You can match this event with a TransactionStart event to discover which transaction is failing. Source machine, process, and thread to uniquely identify the machine where the transaction failed.

Unique identifier for the event in the form of a GUID

Correlation ID, for use in matching with TransactionStart events.

Retain value, for indicating whether a new transaction will be started as soon as this transaction is undone.

Return code, the return value for the Rollback event. The return value can be any of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

QuerySend Indicates that a component sent a query to the database. You can match this event with the QueryResult event to see how long the query took to process and to ensure the query completed without errors. Source machine, process, and thread to uniquely identify the machine that sent the query.

Unique identifier for the event, in the form of a GUID.

Correlation ID, for use in matching with QueryResult events.

SQLText, the SQL statements that comprise the query.

QueryResult Indicates that the database returned a resultset in response to a query. You can match this event with the QuerySend event to see how long the query took to process and to ensure the query completed without errors. Source machine, process, and thread IDs, used to uniquely identify the machine that sent the query.

Unique identifier for the event, in the form of a GUID.

Correlation ID, for use in matching with QuerySend events.

SQLText, the SQL statements that comprise the query.

Return code, the return value for the Query event. The return value can be any of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

Connection Start Indicates that the SQL OLE DB Provider requested a connection to a SQL Server. Machine, process, and thread IDs, used to uniquely identify the machine where the connection request was made.

Unique identifier for the event in the form of a GUID.

Correlation ID, for use in matching with ConnectionComplete events.

SQLServerDatabaseUserID, which uniquely identifies the SQL Server name, the name of the database to which to connect, and the user ID with which to log in.

Connection Complete Generated when SQL Server replies to the connection request of the SQL OLE DB Provider. Source machine, process, and thread IDs, used to uniquely identify the machine that acknowledged the connection request.

Unique identifier for the event in the form of a GUID.

Correlation ID, for use in matching with ConnectionStart events.

SQLServerDatabaseUserID, which uniquely identifies the SQL Server name, the name of the database to which to connect, and the user ID with which to log in.

Return code, the return value for the Connection event. The return value can be any of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

Disconnect Start Generated when the SQL OLE DB Provider requests to disconnect from the SQL Server. Source machine, process, and thread IDs, for uniquely identifying the machine that made the disconnect request.

Unique identifier for the event in the form of a GUID.

Correlation ID, for use in matching with DisconnectComplete events.

SQLServerDatabaseUserID, which uniquely identifies the SQL Server name, the name of the database to which to connect, and the user ID with which to log in.

Disconnect Complete Generated when SQL Server replies to a disconnect request from the SQL OLE DB Provider. Source machine, process, and thread IDs, to uniquely identify the machine that replied to the disconnect request.

Unique identifier for the event, in the form of a GUID.

Correlation ID, for use in matching DisconnectStart events.

SQLServerDatabaseUserId, which uniquely identifies the SQL Server name, the name of the database to which to connect, and the user ID with which to log in.

Return code, the return value for the Disconnect event. The return value can be one of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

JoinDTC Generated when the SQL OLE DB Provider joins the Distributed Transaction Coordinator (DTC). Source machine, process, and thread IDs, to uniquely identify the machine that joins DTC.

Unique identifier for the event, in the form of a GUID.

Correlation ID, for use in matching with LeaveDTC events.

Return code, the return value for the JoinDTC event. The return value can be one of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE

LeaveDTC Generated when the SQL OLE DB Provider leaves the Distributed Transaction Coordinator (DTC). Source machine, process, and thread IDs, for uniquely identifying the machine that leaves DTC.

Unique identifier for this event in the form of a GUID.

Correlation ID, for use in matching JoinDTC events.

Return code, the return value for the LeaveDTC event. The return value can be one of the following:

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_STILL_EXECUTING
SQL_NEED_DATA
SQL_NO_DATA_FOUND
SQL_ERROR
SQL_INVALID_HANDLE