Informix Error -499
-499 The operation causes a rowsize to exceed the allowable limit
(32767).The maximum size of a table record is 32,767 bytes. Check the summary sizes of all the fields in the table. Make sure that the operation you have attempted does not lead to exceeding the maximum row size.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-499 is a hard row-size limit: a table record can't exceed 32,767 bytes in total, and the
attempted operation (CREATE TABLE, ALTER TABLE ADD, or a column-widening ALTER TABLE MODIFY) would push the combined size of all fields past that ceiling.
- A
CREATE TABLEwith too many columns, or columns too wide, for the combined row size to fit within 32,767 bytes. ALTER TABLE ADDadding a new column that pushes an already-wide table over the limit.ALTER TABLE MODIFYwidening an existing column (e.g.VARCHAR(100)toVARCHAR(500)) on a table that was already close to the row-size ceiling.- A schema evolving incrementally over time, with each individual change seeming small but cumulatively approaching the limit.
Solutions / Resolution
- Review the combined sizes of all fields in the table, per the official guidance, to identify what's pushing the total over 32,767 bytes.
- Consider splitting a very wide table into two related tables (a 1:1 relationship via a shared key), moving less frequently accessed or larger columns into the second table.
- Consider using
TEXT/BYTE/LVARCHARfor large variable-length content where applicable, since these are typically stored with different size accounting than a fixed in-rowCHAR/VARCHARallocation (confirm against the specific server version's exact accounting rules). - Reconsider whether every column genuinely needs its current declared width, especially
CHAR/VARCHARcolumns sized generously "just in case."
Examples
Checking combined column sizes before adding a new one
SELECT SUM(collength) FROM syscolumns
WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'wide_table');
-- compare against 32767 minus the new column's intended width
Splitting a table that's approaching the limit
CREATE TABLE orders_core (
order_id INTEGER PRIMARY KEY,
customer_id INTEGER,
status VARCHAR(20)
);
CREATE TABLE orders_detail (
order_id INTEGER PRIMARY KEY REFERENCES orders_core(order_id),
notes VARCHAR(2000),
shipping_instructions VARCHAR(2000)
);
Diagnostic Checks
- Sum the declared widths of every column in the target table via
syscolumns. - Compare that sum (plus the intended change) against the 32,767-byte limit.
- Identify the widest, least-necessary columns as candidates for splitting into a related table or switching to a large-object type.
Related Errors / Related Topics
- -370 — "Cannot drop last column." Another structural
ALTER TABLErestriction, in a different context (a table needing at least one column, rather than a total size ceiling). - -328 — "Column column-name already exists in table." Another
ALTER TABLE ADD-time restriction, about naming rather than row-size limits.
Splitting an overly wide table into two related tables (via a shared key) is usually a cleaner fix than trimming column widths across the board, especially for tables that keep growing.