February 24, 2011 at 8:27 am
Alex Webber (2/24/2011)
Just to add, I can't find anywhere that we're using SERIALIZABLE isolation level (we have no TransactionScope usage either) but after googling around there appear to be one or two posts that suggest key-range-locks can occur whilst in READ COMMITTED isolation level. Like the top answer here:
Yes, there are a few examples of this - the indexed view thing I mentioned earlier and cascading RI. Do you have an ON UPDATE/DELETE CASCADE foreign key constraint?
Wouldn't apply to your INSERT though 😉
February 24, 2011 at 8:32 am
Code to find sessions/requests using SERIALIZABLE:
-- Sessions
SELECT *
FROM sys.dm_exec_sessions AS S
WHERE S.transaction_isolation_level = 4
;
-- Active requests
SELECT *
FROM sys.dm_exec_requests AS R
WHERE R.transaction_isolation_level = 4
;
February 24, 2011 at 8:32 am
No FK constraints either. When using Reflector to peek inside the LINQ-To-SQL ORM, you can see that it uses an explicit transaction with Read Committed isolation level. Guess I'll go away and have a play to see what's really going on.
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply