Informix Error -24121: Data Dictionary locking error (%s).
Cause and resolution
Data Dictionary locking error (%s).
This error can occur when there is a conflict between a DML statement running on a given table and a concurrent DDL statement trying to modify that same table. The table name is specified in the error message. This conflict can occur between 2 different users, or even with a single user if that single user has an open cursor on the table being modified. In the latter case, the ISAM error code will be set to -106, non-exclusive access. The combination of SQL error code -24121 and ISAM error code -106 will uniquely indentify this situation.
The corrective action is to first close any cursors that reference the table being modified. The ISAM error code can give further details on the particular conflict resolution in the event the problem is multi-user related. For example, the error code might indicate that a timeout has occurred. In that case, the corrective action might be to increase the wait time (set by the command SET LOCK MODE TO WAIT). Other error codes can indicate that a deadlock has occurred and you can look up the recommendations for the ISAM error code for descriptions and corrective actions.
This situation is not influenced by ISOLATION LEVEL and can occur at any isolation level. This internal locking that occurs is necessary to enforce consistent metadata. Without this consistency, a variety of unpredictable and inconsistent, potentially fatal, errors can occur.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-24121 fires when a DML statement running on a table conflicts with a concurrent DDL statement trying to modify that same table — per the official guidance, the table name involved is given in the error message. This internal locking enforces metadata consistency and applies regardless of isolation level.
- A concurrent DDL statement conflicting with a DML statement on the same table, per
the official guidance — between two different users, or between a single user's open
cursor and their own concurrent DDL (in which case the accompanying ISAM error code is
-106, non-exclusive access). - A lock-wait timeout or deadlock during that conflict, per the official guidance, identified by the accompanying ISAM error code.
Solutions / Resolution
- Close any cursors referencing the table being modified, per the official guidance, as the first corrective action.
- Check the accompanying ISAM error code for further detail, per the official
guidance — e.g. increase the lock-wait time via
SET LOCK MODE TO WAITif it indicates a timeout, or apply the usual deadlock-resolution steps if it indicates a deadlock.
Examples
N/A
No specific triggering statement is documented beyond a DML/DDL conflict on the same table.
Diagnostic Checks
- Check the table name given in the error message, close any of your own open cursors on it, and check the accompanying ISAM error code for the specific conflict type.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -24121 in this set yet.
A DML statement conflicted with a concurrent DDL statement on the same table — close open cursors on it and check the accompanying ISAM error code.