Hi @Sudip Bhatt ,
As mentioned in Hints, please refer details about these hints below:
- ROWLOCK
Specifies that row locks are taken when page or table locks are ordinarily taken.
- XLOCK
Specifies that exclusive locks are to be taken and held until the transaction completes. If specified with ROWLOCK, PAGLOCK, or TABLOCK, the exclusive locks apply to the appropriate level of granularity.
So combination of using XLOCK and ROWLOCK will block another session to read this same row.
- HOLDLOCK
Is equivalent to SERIALIZABLE which is the highest level of isolation transactions, it requires serialized execution of transactions, transactions can only be executed one after another, not concurrent execution
So using HOLDLOCK means the isolation level is set to the Serializable.
The combination of using xlock, rowlock, holdlock do not conflict and it will lead to an exclusive rowlock that is held until the end of the transaction.
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.