Informix Error -838: A line in the load file is too long.
Cause and resolution
A line in the load file is too long.
Each line of the input file to LOAD must be read into storage in full to be processed. Informix SQL resizes its memory buffer as required to hold the current line. But in this case, it was not able to allocate a large enough buffer. This error is most likely when the load file contains TEXT or BYTE data values or very large CHAR values. All of the values for one row must be contained in one line of the file. If you cannot rerun the program with more memory available, modify the input file to have fewer or shorter values in each row. Or use the dbload utility to try to load the file.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-838 fires when LOAD can't allocate a large enough memory buffer to hold one full line
(representing one full row) of the input file — per the official guidance, this is most likely
when the load file contains TEXT/BYTE data or very large CHAR values, since every value for
one row must fit on a single line of the file.
- A row containing
TEXT/BYTEdata or very largeCHARvalues, per the official guidance — the specific, named likely cause, since these can make a single line very long. - Insufficient available memory to allocate a buffer large enough for the actual line length, even if the line itself isn't unreasonable for the data it holds.
Solutions / Resolution
- Rerun the program with more memory available, per the official guidance, if that's feasible.
- Modify the input file to have fewer or shorter values in each row, per the official guidance, if increasing available memory isn't an option.
- Use the
dbloadutility instead, per the official guidance, as an alternative loading mechanism that may handle this case better.
Examples
Switching to dbload as an alternative
$ cat control_file.ctl
FILE 'orders_import.unl' DELIMITER '|';
INSERT INTO orders;
$ dbload -d target_db -c control_file.ctl -l error_log.log
dbload takes its input file via a FILE clause inside the control file (-c), not as a
command-line argument; -l names dbload's own log file. dbload may handle long lines (large
TEXT/BYTE/CHAR values) differently than the interactive LOAD statement.
Diagnostic Checks
- Check whether the load file contains
TEXT/BYTEdata or very largeCHARvalues, per the official guidance's specifically named likely cause. - Check available memory at the time of the failure.
Related Errors / Related Topics
- -837 — "There is not enough memory available." A related, more general memory-allocation error, obsolete since Version 4.1, in the same general family as this line-buffer-specific case.
Most likely caused by TEXT/BYTE or very large CHAR values in a row — free more memory,
shorten the data, or switch to dbload.