Monday, February 20, 2012

Issolation level

When on Oracle in one transaction I modify data when I select data on other transaction I get old data (until commit on first transaction)

Using MS SQL I must wait or I get (dirty read) modified values
Example:

Transaction no 1:
begin transaction
update ckk_klienci set kl_skrot = 'KLINTIN' where kl_id = 300000001
-- commit

Transaction no2:
select kl_skrot from ckk_klienci where kl_id = 300000001

Until there is no commit on Transaction no 1 transaction no 2 waits (gives no answer) lowering issolation level I can get new value

Is it possible to configure MS SQL as it works like Oracle

Thanks for halp
I want to know; I don't want to say that this is wrong; I just want to know if it is possibleRE [Quote][Size=1]
When on Oracle in one transaction I modify data when I select data on other transaction I get old data (until commit on first transaction)
Using MS SQL I must wait or I get (dirty read) modified values
Example:
Transaction no 1:
begin transaction
update ckk_klienci set kl_skrot = 'KLINTIN' where kl_id = 300000001
-- commit
Transaction no2:
select kl_skrot from ckk_klienci where kl_id = 300000001
Until there is no commit on Transaction no 1 transaction no 2 waits (gives no answer) lowering issolation level I can get new value
Is it possible to configure MS SQL as it works like Oracle
Thanks for halp
I want to know; I don't want to say that this is wrong; I just want to know if it is possible
[\Quote][\Size]

Q1 [Is it possible to configure MS SQL as it works like Oracle?]
A1 Obviously they are different products; however you can certainly control transaction isolation levels as appropriate / needed. For example:

Set Transaction Isolation Level Read Committed

No comments:

Post a Comment