Salesline is locked during batch import Sales Orders
philipv
Member Posts: 4
Hi,
I have designed a dataport which imports new sales orders from a text file(header and lines) with no special functionality.
During this import which may be half and hour long all the other users cannot insert new sales lines.
It seems that salesline table is locked.
After debugging I have found that when one line inserted in sales line all the other users cannot insert new line in sales line.
I cannot understand this behavior.I'm working on 3.70.b and SQL server.
During insert i know that there is a lock but on the specified record.
How can other users that work on different records can be locked ?
The same think does not occur in Sales Header.
I have designed a dataport which imports new sales orders from a text file(header and lines) with no special functionality.
During this import which may be half and hour long all the other users cannot insert new sales lines.
It seems that salesline table is locked.
After debugging I have found that when one line inserted in sales line all the other users cannot insert new line in sales line.
I cannot understand this behavior.I'm working on 3.70.b and SQL server.
During insert i know that there is a lock but on the specified record.
How can other users that work on different records can be locked ?
The same think does not occur in Sales Header.
0
Comments
-
Hi,
With native database, you lock the table while inserting.
With SQL Server, because you surely not filter the dataitem, you also lock the table. But even if you filter it, SQL will lock the table to optimize the insert.
Regards.0 -
1) In the OnInsert-trigger of table 37 is a LOCKTABLE. If you use the insert-triggers, this blocks the whole table.
2) SQL starts with record-locking. But if he notices that it is more performant, he will switch to page-locking and also to table-locking. There is no way to control this behaviour.
The best way is to do a COMMIT after some records. But of course in case of an error, some records can be written to the DB and if you restart the import, these records must not be inserted again.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions