Locking and Transaction Isolation Level

  • When you issue a select statement and the connection has SERIALIZABLE isolation level set but dosen't involve a transaction, only (S) locks are used on the exact records right rather than shared range? Meaning connections that run under SERIALIZABLE isolation level issuing only select queries won't have any more impact on other users or lock types than running only select queries under READ COMMITTED isolation level.

    I know that if this was in a BEGIN transaction SERIALIZABLE would hold locks until a commit is issued.

    So any difference between SERIALIZABLE and READ COMMITTED if your only running select queries? My assuption is NO unless you issue a begin transaction. Please correct me if I'm wrong.

  • This was removed by the editor as SPAM

  • I was thinking that was correct until I did the following test

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

    BEGIN TRANSACTION

    UPDATE dbo.Table SET Name = 'Test' where ID = 1

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

    EXEC dbo.SelectProcedure

    I see that the Select procedure takes out many range S-S locks but if I run the same commands above but change the select procedure to run under READ COMMITTED it dosen't take out range locks.

    SET TRANSACTION ISOLATION LEVEL READ COMMITTED

    EXEC dbo.SelectProcedure

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply