Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server SQL探查器未显示所有ADO.NET操作_Sql Server_Sql Server 2008_Entity Framework_Ado.net_Sql Server Profiler - Fatal编程技术网

Sql server SQL探查器未显示所有ADO.NET操作

Sql server SQL探查器未显示所有ADO.NET操作,sql-server,sql-server-2008,entity-framework,ado.net,sql-server-profiler,Sql Server,Sql Server 2008,Entity Framework,Ado.net,Sql Server Profiler,我有以下创建可序列化事务的代码。该应用程序按预期工作: using (var tx = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.Serializable, Timeout = new TimeSpan(0, 2, 0) })) { // Modify database using EF. tx.Complet

我有以下创建可序列化事务的代码。该应用程序按预期工作:

using (var tx = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.Serializable, Timeout = new TimeSpan(0, 2, 0) }))
{
  // Modify database using EF.
  tx.Complete();
}
然而,对数据库进行分析给我带来了一些困惑

// Start of transaction (and the first query). Login has invalid ISO LEV.
Audit Login       ... set transaction isolation level read committed ...
SQLTransaction    0 - Begin
RPC:Completed     exec sp_executesql N'SELECT TOP (1)... 

// Second query in transaction. Login now has valid ISO LEV.
Audit Logout
RPC:Completed     exec sp_reset_connection
Audit Login       ... set transaction isolation level read serializable ...
RPC:Completed     exec sp_executesql N'SELECT TOP (1)... 
因为我可以看到第一个查询实际上是在serializable下执行的(我可以从它获取的锁中推断出这一点),所以我可以得出的唯一理由是Audit Login只是在登录时声明SPID的ISO级别,而不是将其更改为什么


如果是这样,那么触发ISO变更的事件在哪里?我已打开所有事件,但看不到任何内容…

更改事务隔离级别不是
RPC:Completed
事件


仔细检查是否正在监视
SQL:BatchStarting
SQL:BatchCompleted
事件。

已存在于我的跟踪中。它们不显示TransactionScope的隔离级别。