I have one session opened and I execute the query:
BEGIN TRAN SELECT * FROM Inventory with (updlock, holdlock) WHERE ItemID = 796
Transaction is still opened.
If i open the second window, and I execute the following query:
SELECT * FROM Inventory WHERE ItemID = 796
i should'n see the result, since previous transaction should hold exclusive lock on inventory table(lock on entire table).
I have default read committed isolation level - but if there is holdlock, no matter of transaction level, nobody should't read the row with id=796 (unless select is executed with hint: "with nolock").
Why I can read the locked table from other session? What should i change?
br, Simon