Informix Error -2022: This identifier exceeds the maximum length for identifiers, which is <length>.
Cause and resolution
This identifier exceeds the maximum length for identifiers, which is <length>.
Names of fields and other identifiers cannot exceed the maximum length. In IBM Informix Dynamic Server 9.2 or later, the maximum length for identifiers is 128 characters. In other Informix database servers, the maximum length for identifiers is 18 characters.
Revise the form specification and recompile it.
</length>Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2022 fires when a field name or other identifier in a form specification exceeds the maximum identifier length — per the official guidance, the limit depends on the server version: 128 characters for IBM Informix Dynamic Server 9.2 or later, or 18 characters for other Informix servers.
- An identifier longer than the server-version-specific maximum, per the official guidance — the direct, only cause.
Solutions / Resolution
- Revise the form specification and recompile it to comply with the identifier-length restriction, per the official guidance.
Examples
Checking an identifier's length
$ echo -n "a_very_long_field_identifier_name_that_might_exceed_the_limit" | wc -c
Diagnostic Checks
- Measure the identifier's length, and confirm it fits within 18 characters (pre-9.2 servers) or 128 characters (9.2+).
Related Errors / Related Topics
- -1805 — "Invalid connection name." A related identifier-rule error, about connection names specifically, sharing the same length limits.
An identifier exceeds the server's maximum length — shorten it and recompile.