Link to home
Start Free TrialLog in
Avatar of jdr0606
jdr0606Flag for United States of America

asked on

Prevent a table from getting locked on Insert or Update

I have a stored procedure that is being called from a Great Plains application that updates and inserts into a custom table.

The issue is that on occasion the table for some reason gets locked and starts blocking SQL connections until all user connections are terminated.

How is the best way to provide inserts and updates and prevent table locking issues.

I have attached the SPROC in question

ThanksSQL2005-Sproc.rtf
ASKER CERTIFIED SOLUTION
Avatar of QPR
QPR
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Scott Pletcher
Verify that you have an index on udtUserPrefS with a key of UserID and including at least column CompanyID.