lock priority | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

lock priority

can i set a priority when two threads request a table in the same time? Thanks.
As far I know there is no priorities.
Can you access the table without lock?, if yes use NO LOCK.
Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
i used NOLOCK in my selects, but my problem is with transactions. I have used XLOCK in inserts and updates.
Please give me another solution. Thanks.
See: http://www.sql-server-performance.com/reducing_locks.asp HTH Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
quote:Originally posted by LuisMartin See: http://www.sql-server-performance.com/reducing_locks.asp HTH Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

quote:Originally posted by LuisMartin See: http://www.sql-server-performance.com/reducing_locks.asp

Belive me, i have read this article 1000 times but i have the same problem.
Thanks anyway, but please think in something else.
I have to update a table many times at the same transaction without finish it, meanwhile another thread inserts in the same table and try commit it. Please give me a way to avoid blocking.
I need to know args for Microsoft SqlServer jdbc driver, can i put a parameter for lock_timeout?
Earlier releases of SQL Server include the NOLOCK hint, which lets SQL Server read uncommitted data so it doesn’t block on a lock. Although the LOCK_TIMEOUT setting might be just what you’ve been waiting for, use it with extreme caution. This error doesn’t automatically roll back a transaction. So if SQL Server reaches its lock timeout value, it stops trying to modify rows in the current table and moves on to the next statement. Refer to the books online about LOCK_TIMEOUT topic. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>