sql server - Entity Framework: how to find transaction isolation level in SQL Profiler? -


begintransaction method used manage transactions in entity framework 6. allows set isolation level transaction may see in code below (just sample):

using (var context = new datacontext()) {     using (var transaction = context.database.begintransaction(isolationlevel.serializable))     {         context.entities.add(new entity());          context.savechanges();          transaction.commit();     }  } 

the problem is: when use sql server profiler, cann't find information isolation level real sql transaction.

attempt #1:

i tried trace kinds of events , search "isolation" keyword in trace results. 2 events found:

eventclass          textdata ------------------------------------------------------------- existingconnection  set transaction isolation level read committed auditlogin          set transaction isolation level read committed 

read committed in these events. not code, because isolationlevel.serializable set above.

attempt #2:

for transaction has been started , not committed yet, possible take spid , manually select real isolation level dm_exec_sessions view:

select transaction_isolation_level sys.dm_exec_sessions session_id = @tran_spid 

this undesirable way.

is possible record isolation level ef-generated transaction/session in profiler directly? maybe use wrong tool?

p.s. entity framework 6.1.3 , ms sql server 2012 on board.

you cannot find transaction isolation level in profiler never recorded. see how monitor transaction isolation level changes in sql profiler or in other tool explanation.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -