Table lock problem in SQL

fdezaratefdezarate Member Posts: 5
Hi all,
I have a important problem with Item register.

The problem succeded when I have two or more process to do Item Ledger Entry and the Navision return this error "The Item Ledger Entry table cannot be changed because it is locked by another user".

I think the problem will be solved with RECORDLEVELLOCKING but I don't Know where is the best place to use this function.

Can anyone help me.

Thanks ](*,)

Comments

  • EugeneEugene Member Posts: 309
    first of all what database you using - native or MS SQL ?

    RECORDLEVELLOCKING simply returns TRUE for MSSQL database and returns FALSE for native database.

    In Native when you do LOCKTABLE the whole table is locked and noone else can write to the table.
    MS SQL however is capable of locking only the record you use allowing others to work with other records.
    in MS SQL LOCKTABLE only tells the server that you want to work in SERIALIZABLE transaction isolation level (it basically means the records you have read or written to are garanteed no to change until you finish)
  • kinekine Member Posts: 12,562
    Posting is in most cases serial process. You need to optimize the SQL DB (Indexes, discs etc.) to have posting as fast as possible. Search this forum for more info about how to optimize MS SQL for performance with NAV.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sharmaaksharmaak Member Posts: 1
    DEAR SIR/MADUM

    CAN U Provide me the solution on error where intermidately
    the table locking error is displayed.
    We are using MS-SQL-2000 & NAVISION 4.0

    Please reply.

    Thanks

    Ashok Sharma (Mumbai-INDIA)
    Email:ashok_sharma41@rediffmail.com
    ASHOK SHARMA
  • kinekine Member Posts: 12,562
    sharmaak, there is no "simple" answer for that.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.