Informix Error -3011: A table is locked -- no reading or writing is permitted.
Cause and resolution
A table is locked -- no reading or writing is permitted.
Because another user has locked a table in exclusive mode, PERFORM cannot continue. Rerun the transaction when the table is not locked.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-3011 fires when PERFORM needs to read or write a table another user has locked in exclusive
mode — per the official guidance, PERFORM cannot continue while the exclusive lock holds.
- Another user holding an exclusive lock on the table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rerun the transaction when the table is not locked, per the official guidance.
Examples
Checking current locks
SELECT * FROM sysmaster:syslocks WHERE dbsname = 'mydb';
Diagnostic Checks
- Check
sysmaster:syslocksfor an exclusive lock on the table, and retry once it's released.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -3011 in this set yet.
Another user holds an exclusive lock on the table — rerun the transaction once the lock is released.