本文介绍了如何监视SQL Profiler或任何其他工具中的事务隔离级更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地在音频登录事件中看到事务隔离级别事件。有没有其他方法可以使用SQL Profiler或使用其他工具监视事务隔离级别更改?我问的原因是因为SQL Profiler似乎无法以正确的顺序输出事件,或者跳过事件,因为将 IsolationLevel 设置为可序列化在我的应用程序中,它仍然显示事务隔离级别提交

I've successfully only been able to see transaction isolation level events in the Audio 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.

示例SQL Profiler中的审核登录

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


推荐答案

恐怕没有一个。

即使有一个,你想要看到多个表的位置e查询加入,一个或多个已读取NOLOCK未提交?

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)

您最好的办法是手动解析语句start(批处理和过程)并查找设置交易隔离级别。

The best you could do is to manually parse the statement start (batch and procedure) and look for the set transaction isolation level.

ed

这篇关于如何监视SQL Profiler或任何其他工具中的事务隔离级更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 17:55