I've successfully only been able to see transaction isolation level
events in the Audit Login
event. Are there any other ways to monitor the transaction isolation level
changes using SQL Profiler or using some other tool? The reason I ask is because SQL Profiler does not seem to be able to output the events in the right order or it skips events because when setting the IsolationLevel
to Serializable
in my app it still shows transaction isolation level read committed
.
Example Audit Login
in SQL Profiler:
-- network protocol: Named Pipes
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level serializable
To check the isolation level(s) present in the statement, the simplest way is to look at the T-SQL itself and see if any hints are present. If not, it is operating at the isolation level of the connection.
The ALLOW_SNAPSHOT_ISOLATION database option must be set to ON before you can start a transaction that uses the SNAPSHOT isolation level. If a transaction using the SNAPSHOT isolation level accesses data in multiple databases, ALLOW_SNAPSHOT_ISOLATION must be set to ON in each database.
Concurrency control comprises the underlying mechanisms in a DBMS which handle isolation and guarantee related correctness.
InnoDB offers all four transaction isolation levels described by the SQL:1992 standard: READ UNCOMMITTED , READ COMMITTED , REPEATABLE READ , and SERIALIZABLE .
I am afraid there isn't one.
Even if there was one, what would you want to see where multiple tables were queried in a join and one or more had NOLOCK which is read uncommitted?
The profiler reports queries at the statement level not the table level so you would have a mix of transaction isolation levels (this is true of the profiler and extended events)
The best you could do is to manually parse the statement start (batch and procedure) and look for the set transaction isolation level.
ed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With