I saw the combination of (xlock,rowlock,holdlock) is used for a table. Refer to online book, holdlock is to hold shared lock(for read,such as select) until transaction is done and xlock is exclusive lock(write lock) for data modification, such as update, insert or delete. How could we use read and write a table at the same time? I am wondering if the combination take effect or not. Confusing...
Locking hints come in various types:
rowlock
, paglock
, tablock
nolock
, updlock
, xlock
holdlock
, readpast
, nowait
The combination you suggest is xlock, rowlock, holdlock
. Those three do not conflict. It'll lead to an exclusive rowlock that is held until the end of the transaction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With