While working on the native database and doing a batch post. Front End users can not continue working on sales documents as Sales tables are locked in the begining of the Sales Process and released after posting.
Can i remove the lock from the posting routine..... and some flag + code can be added in the client so that user can not modify the record that is currently being sent for post :idea: .... I hope it should not cause any data Inconsistency...
0
Comments
Only one user can write to table at a time, even without LOCKTABLE. If you do not code it, the Server does the locking by itself, then as late as possible (optimistic concurrency).
-Fast clients
-Fast network
-Commit cache on service and enough DB-cache (and enough memory to keep the DB-cache completely in memory)
-few (and small) indexes/SIFT-fields on the tables involved
-enough object-cache on the client, so it does not always has to get the objects from the server
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In short, in the entry-tables, you can toggle of the MaintainSQLIndex and SIFTIndex for a lot of keys and with that writing to the DB becomes a lot faster.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Put in a commit and a sleep statement in the batch routine as kine has suggested, that way the batch postings will take longer but other users can at least get a new document no. to create the new order. If necessary, the order can then be posted while the batch is sleeping ( a delay of a few seconds is possible, but it won't take minutes like before).
Still , all users might frequently receive error messages like this one (ENU language version)
The xyz table cannot be locked or changed because it is already locked by the user with User ID xyz.
Wait until the user is finished and then try again.
The first time you post an order, it can be a little slow, but after that it is fast because all the objects are in the object-cache.
So I wonder a few things:
1) how many lines does an order contain? If it contains a few hundreds, it will be slow and the only thing you can do is posting when no one else works. If it contains less, it should be fast.
2) From the client/NAS you are posting, did you put some object-cache (if you take double the amount Navision uses standard, it should be enough (at least if you didn't change a lot, like calling other objects in C80,C12,C22,...))
3) Have you enabled the COMMIT-cach on the DB-server?
4) did you remove the COMMIT in C80?
5) if you have changed the code, are you sure it is performant, like using some filters with a wrong SETCURRENTKEY?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Of course optimizing HW is better, but if you still have 1sec/doc and you are posting 200 docs, you still have 3 min per batch, and this is too long for users, which need response in max 20 sec... (magic limit)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I am following the Queue approach for making the posting SERIALIZED so that there are no deadlocks. If everything is Queued chances are that at some point of time Queue may have around 2000 postings.
I need to take care of this approach for SQL as well as Native server. For SQL it will be a little slow but will not affect the front end users but for Native I am sure it won't allow users to create new Orders and other documents if sales line is locked.
If I remove Locking on Sales Line from CU 80.. How it's going to lead to DATA INCONSISTENCY????