Feedback
Did this article resolve your question/issue?

   

Article

Can aimage scan verbose be used to determine how many locks were held at a certain time

Information

 
TitleCan aimage scan verbose be used to determine how many locks were held at a certain time
URL Namecan-aimage-scan-verbose-of-an-ai-file-be-used-to-determine-how-many-locks-were-held-at-a-certain-time-the-database-was-running
Article Number000188945
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
Can aimage scan verbose of an AI file be used to determine how many locks were held at a certain time the database was running?
Trying to determine which user was holding a large number of locks after the Database crashed with (915) lock table overflow error
Trying to determine the number of locks held by reviewing the content of an aimage scan verbose
Steps to Reproduce
Clarifying Information
Error MessageLock table overflow, increase -L on server (915)
Defect Number
Enhancement Number
Cause
Resolution
The aimage scan verbose output cannot be used to directly determine how many locks were held at a certain time the database was running

The AI will record transaction note changes made during the period covered by the AI file but will cannot be used to determine the locks held during that period, if locks were being held by clients that made no changes to the locked records in that period. AI scan verbose output would need to be run on all ai files created since the database was started to track this activity.

By reviewing the transaction notes in the AI scan verbose output, it may be possible to determine if there were large scoped transactions, by grepping the output to see each transaction ID's associated transaction notes.

In the following example: Transaction 27989 deleted a record in area 9 in the block for dbkey 128

Trid: 27989 - The transaction ID is recorded for every entry.
Trid: 27989 code = RL_RMDEL - codes detail the operations for each Transaction 
Trid: 27989 area = 9   dbkey = 128 - the dbkey/area the Transaction operation affected

A record CREATE, UPDATE or DELETE implicitly requires a lock, therefore during this transaction at least one lock table entry was needed.
  • If there are RL_RMCR, RMCHG or RMDEL those will typically require a lock.
  • If the transaction scope is small, it won't hold the lock for too long (usually).
  • If the transaction scope is large it holds the locks either as exclusive or shared for the duration of the transaction.  Repetition of the same transaction ID indicates multiple notes for one transaction. If there are thousands, or millions of notes related to a single transaction ID it can indicate a large single scoped transaction.
How many locks may have been used can be loosely determined by grepping the aimage scan verbose output and performing line counts for each transaction id.
 
cat aioutput.txt | grep "\<Trid: 27989\>" | egrep "RL_RMCR|RL_RMDEL|RL_RMCHG" | wc -l
Workaround
Notes
Last Modified Date9/24/2021 3:52 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.