Options

Who is the root for the lock...

radek.bbradek.bb Member Posts: 49
Hi,

Navision 3,7 / NativDB.
It happens that locks occurs in the system.
Is it possible to get list of users who are waiting in a queue?
Or at least the first one who is actually locking the table?

Typical problem is that lock is placed in the code, than sth is happening what requires user interaction... but user went for coffe :evil:

I think that such information should be written somewhere
in the system... :?:

Radek

Comments

  • Options
    KowaKowa Member Posts: 918
    If there are Confirm Messages in a Posting routine , which are not being confirmed
    , because the user A is drinking his coffee :wink:, then this unconfirmed message will block the next user ( he will see a message like "TableXYZ is locked by User A) , and when user C starts the same routine he will see
    "TableXYZ is locked by User B", because he is the next in line.
    When User A returns from his coffee break and presses YES or NO, the
    locking ends and posting proceeds ( provided the database data used in the posting routine has not been changed in the meantime)

    The solution for this problem is simple :
    Never leave the workstation while a posting routine is in progress! [-X
    ( there can be other errors as well)
    AND
    Do not use confirm statements in posting routines.
    Kai Kowalewski
  • Options
    radek.bbradek.bb Member Posts: 49
    You are 100% true :)

    So, where I can find an information about current locks?
    It must be somewhere... :?

    R
  • Options
    kinekine Member Posts: 12,562
    Look into Sessions table... there are fields "Blocked", "Blocked by", "Blocked by object"... if you will search through this chain and find first user which is not blocked but is blocking, it is the user you search for... BUT THIS IS only for MS SQL Option. As you wrote, you have Native DB - the client shows you the information, to which user is waiting in the status bar... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    radek.bbradek.bb Member Posts: 49
    Status Bar is not enough... :-k
    I am trying to teach users:
    "Look who is blocking you, call her/him, let he/she make next call, etc.."
    but in the WAN reality (country-wide) it is not working in 100%.

    Is it really only SQL what has Session table? Server operating on Nativ engine need this information also...

    R.
  • Options
    kinekine Member Posts: 12,562
    Sorry, but I think that there is no more information on Native DB. I checked the extended session monitoring from MBS but there are only infromations about scanned, inserted, deleted records, disk reads/writes, cache hits etc. but no Locking informations...

    You can only check, which user is "Live" and which are waiting by comparing the value changes in time. But you can only assume, that someone with no changes on this values is waiting.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.