DEADLOCK_TIMEOUT and SET LOCK MODE
When working with distributed queries, you can use the SET LOCK MODE statement in conjunction with the DEADLOCK_TIMEOUT configuration parameter to help prevent server deadlock.
When you request the WAIT option of SET LOCK MODE, the database server protects against the possibility of a deadlock. However, if the database server discovers that a deadlock can occur, it terminates the operation and returns an error.
The DEADLOCK_TIMEOUT configuration parameter specifies the maximum number of seconds that a database server thread can wait to acquire a lock. This value is the default value used by the SET LOCK MODE WAIT statement. This value applies only if you acquire locks on the current and remote database server within the same transaction.