December 23, 2005 at 3:22 am
I am trying to test setting Transaction Isolation levels on our dev server which is sql7.
I have an open QA page with this code
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
GO
begin tran
update tblWorksOrder set strClientOrderNumber = '0000'
where uGuid='{CD007F93-8C41-4CCB-B421-9C46CF9ADE1F}'
which I presumed from the articles ive read would mean that if another user tried to do a select on that same record before it was commited would return strClientOrderNumber of '0000' not the original which was '9999'. But when I go to my dev website and try and open the page that displays that record it just freezes and does not display until i run
commit tran
Am I totally missing something.
I gathered that if I had set it to READ COMMITTED my web page would only display '0000' once the transaction had been commited.
Whatever I do the page that tries to access that record is locked out from retrieving any data until I commit the transaction.
Can someone explain what is happening and be able to give me a working example of demonstrating the different Isolation levels in practise.
Thanks in advance.
December 23, 2005 at 4:44 am
Your understanding is partially correct, the only thing that you are missing is:-
You need to set the isolation level on the connection that is reading the data (your website), not on the one that is doing the updating (your QA session).
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply