Informix Error -491
-491 DBNLS not set (LC_COLLATE must be string_value).
Set the DBNLS environment variable to an appropriate value. Make sure LC_COLLATE is set to the specified string_value.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-491 is an NLS-environment-configuration error, closely related to -490: the DBNLS
environment variable isn't set, and the specific LC_COLLATE value the database requires is
named directly in the error message.
DBNLSnot set at all in the environment of the session/application connecting to an NLS-enabled database.LC_COLLATEset to a value that doesn't match what the database actually requires — the error message itself names the expectedstring_value.- Environment variables configured for one database's locale requirements, while the
application also connects to a different NLS-enabled database expecting a different
LC_COLLATE.
Solutions / Resolution
- Set the
DBNLSenvironment variable to an appropriate value, per the official guidance. - Ensure
LC_COLLATEis configured to the specific string value named in the error message, per the official guidance — this isn't a generic locale setting but one tied to the specific NLS-enabled database being connected to. - For applications connecting to multiple NLS-enabled databases with different locale requirements, set these environment variables per-connection rather than globally, if the requirements genuinely differ.
Examples
Setting DBNLS and LC_COLLATE
export DBNLS=1
export LC_COLLATE=en_us.utf8
-- use the exact value named in the error message, not a
-- generic or assumed locale string
Diagnostic Checks
- Check whether
DBNLSis set in the connecting session's environment. - Check
LC_COLLATE's current value against the specificstring_valuenamed in the error message.
Related Errors / Related Topics
- -490 — "Database was created without NLS functionality." The base condition this error's environment-configuration requirement applies to — an NLS-enabled database needing matching client-side locale environment variables.
- -445 — "The length of the collation name in the SET COLLATION statement exceeds 32
bytes." A related collation-configuration restriction, in a different context (an explicit
SET COLLATIONstatement rather than environment variables).
Use the exact string_value the error message names for LC_COLLATE — this is tied to the
specific NLS-enabled database being connected to, not a generic system locale.