Update statement should be terminated when encounters a shared lock, what is the best solution?
A.
use with(holdlock)
B.
use sp_who
C.
use sp_lock
D.
use with(nowait)
Explanation:
http://technet.microsoft.com/en-us/library/ms187373.aspxNOWAIT
Instructs the Database Engine to return a message as soon as a lock is encountered on the table. NOWAIT is equivalent to specifying SET LOCK_TIMEOUT 0 for a specific table.