Sunday 13 December 2020

Business Central - Database Lock

Database Lock

In order to view database locks, open page 9511 Database Locks through search bar. The Database Lock page gives the information/snapshot of current database lock.

Database Locking  controls multiple users to access the same data at the same time. To protect a transaction against other transactions modifying the same data, the first transaction put a lock on the data. The lock remains until the transaction is not done. User will be blocked for completing the transaction until the first transaction is not completed. The system will throw the error message that "The operation could not complete because a record in X table is locked by another user...."

Database Lock protects the data from being overwritten by the other transactions executing at the same time. When a Transaction tries to access the data that is being Locked by another Transaction, SQL Server blocks that Transaction. And when a Transaction is blocked for more than 10 seconds (Lock Time-out), it will be terminated automatically with the "Table was Locked by another User" error.



   

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Snippet in AL Language Programming

AL Snippets  are pieces of  AL  code that can be reused for faster  coding  in Visual Studio code. They have the prefix “t”, followed by a m...