I have a client who is trying to Post a Sales Order as well as Post a Receipt and Invoice for a Purchase order and they receive this error:
"The operation could not complete because a record in the G/L Entry table was locked by another user. Please retry the Activity."
The client has recently been upgraded to 2013R2, but this issue only manifested about 2-3 weeks after the upgrade.
I understand this issue if because someone else is trying to post when someone else is, but I do not understand why it is happening so much now? Could it be a timeout issue or slow server? Any help is appreciated. Thank you.
0
Comments
Also you can check the "Session List" and see what user ID's have more than 1... this means they were running a report and decided they didn't need it then exited out of nav... well this leaves the report running on the server and locks people out. You have to write or change the table property a little but you can kill the session from the list..
http://www.mibuso.com/forum/viewtopic.php?t=56261
NAV uses "Read Uncommitted" isolation when running reports. Meaning they issues no locks and ignores other existing locks. Therefore a NAV report does not lock anything and will not produce this situation. The exception being any reports that contain a process where they are populating a "reporting" table, that is then used to product the report's output.
The reason is two-fold: First, of course, that some processes are taking a long time. You suggest that it could be because of a combined sales/receipt/invoice process which locks the G/L Entry table. I don't know how many lines your typical order has, but if we assume that the entire process takes 5 seconds, then if 5 people attempt to do it at the same time, the 2nd user will have to wait for 5 seconds before she can get hold of the G/L Entry table, the 3rd will wait for 10 seconds etc. Compare this to the timeout setting in the File|Database|Alter Advanced tab settings in C/SIDE. Often this timeout is set quite low, meaning people are thrown off quite early. If it e.g. is set as low as 30 sec. then try to change it to 60 sec. In the demo database it is set to 10 seconds which doesn't allow for much locking.
Microsoft - Dynamics NAV
MS needs to add an option in the xml config file to make the sql session ID be the same as NAV Session ID.
Yes the service tier will use more memory but Let the client/consultant decide on setting.
Locking and performance is the single most import problem with NAV and hasn't done much to fix it.
It's sad that in the above topic MS is asking how many lines are there on the sales line.
Asking questions to better understand the situation is the first step in diagnostics of a problem. I, for one, have no problem with MS asking that question. In fact, I'd be more concern if they did not ask.
And if you are modifying or designed the system to write to the same resource, then you have bad design.
Having all the ledger/sub ledger as Entry No. as PK is horrible design for concurrency.
Using No. series lines is horrible design for concurrency.
Using Index View is horrible design for concurrency.
Calculating Unit cost on item card/ stock keeping unit on most transaction is horrible for concurrency.
I cut down the number of SQL maintained keys in the sales line from close to 30 to under 10 and the posting time for a sales order was cut by about 67%.
I don't remember the exact number of keys involved, but they were excessive.
http://mibuso.com/blogs/davidmachanick/
I have taken similar approaches on many sites, but also find you need to take how the system is used into consideration. This can work very well in situations where there may be a lot of sales activity but typically very few sales orders at any give point. A distribution or direct to customer scenario may be an example.
However in situations that involve large numbers of orders existing, this may have a negative impact. Particularly with things such as the production planning tools. Removal of sales line indexes and VSIFT can improve posting performance, but the trade-off can be reduced performance of the planning tools.