Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working with ERP Projects, where there are around 1000 users,accessing tables,doing transction, we are also using the concept of transaction for our projects. I am always facing a problem of Table Lock it's goes into wait and then not wakeup. At that time i used to kill that process,but by killing it's affect all transaction,insert,deletion records get hampered connected with each other.

So kindly suggest me what should i do to avoid table lock/ what should be the structure (just summary).

I have also tried google but not found right answer/or i am unable to get/i have not got right link.

Kindly suggest me.
Posted

1 solution

You're probably missing table hints on your selects.

http://www.techrepublic.com/article/using-nolock-and-readpast-table-hints-in-sql-server/6185492[^]

Using table hints such as a NOLOCK allows a select to read through a record which is lock by a transaction and return the record value from before the transaction.

Syntax from the above link:

SQL
SELECT COUNT(*) FROM SalesHistory WITH(NOLOCK)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900