Informix Error -6022: Lock was denied.
Cause and resolution
Lock was denied.
Probably some other process has already locked the table. The program should wait a short time and attempt the lock again. If the condition persists, the program should roll back its transaction and retry the entire operation.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6022 fires when another process already holds a lock on the table — per the archived catalogue, the program should wait briefly and retry, and if the condition persists, roll back and retry the entire operation.
- Another process holding a conflicting lock on the table, per the archived catalogue — the direct, only cause.
Solutions / Resolution
- Wait briefly and retry the lock request, per the archived catalogue.
- If the condition persists, roll back the transaction and retry the entire operation, per the archived catalogue.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Check what other process/session is holding a lock on the table.
Related Errors / Related Topics
- -6067 — "Tried to unlock a table inside a transaction."
- -6069 — "Tried to lock a table outside a transaction."
Another process holds a conflicting lock — wait and retry; if it persists, roll back and retry the whole operation.