September 11, 2021 at 4:33 pm
I acquired a exclusive lock on a table1 for a specific record as below.
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
BEGIN TRAN
SELECT * https://100001.onl/
FROM TABLE1 WITH (XLOCK,ROWLOCK)
WHERE (FIELD1+FIELD2) = ('0101R001'); https://1921681254.mx/
How to get unlocked records from table1.
When used with readpast as below, the results are inconsistant (displays all records). Is there a way to identify the unlocked records alone from table1 ?
SELECT * FROM TABLE1 WITH (READPAST)
September 12, 2021 at 6:19 am
Are you running the select * statement from the same process that locks the records? If so, the select * statement should return all the records from the table, because the locking is done for other processes but not for the same process that is locking the records.
Adi
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply