Informix Error -23101: Unable to load locale categories.
Cause and resolution
Unable to load locale categories.
An invalid locale name was supplied for the locale initialization. The environment variable specifying the locale category has a wrong value.
Check the value of the corresponding environment variable, CLIENT_LOCALE or DB_LOCALE. If this error was encountered when using the "SET COLLATION" statement, check that the value passed to the statement is a valid locale. If this error was encountered when using the "SET NO COLLATION" statement, check that the session's default locale file is still available. Also check if INFORMIXDIR points to a valid directory where IBM Informix products are installed.
If a client application receives this error when it requests a database server connection, check that the client and database locales are compatible. They are compatible if a valid locale exists on the server computer with the name lg_tr.codeset@mod, where lg_tr (language and territory) and mod (locale modifier) are from the CLIENT_LOCALE and codeset is from the database locale (from the DB_LOCALE, if it is set, or as stored in the database).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-23101 fires when locale initialization is given an invalid locale name — per the official guidance, the environment variable specifying the locale category has an incorrect value.
CLIENT_LOCALEorDB_LOCALEset to an invalid value, per the official guidance — the first named case.- An invalid locale passed to
SET COLLATION, per the official guidance — the second named case. - A missing session default locale file when using
SET NO COLLATION, per the official guidance — the third named case. - Incompatible client and database locales on connection, per the official
guidance — the fourth named case; a valid locale must exist on the server named
lg_tr.codeset@modcombiningCLIENT_LOCALE's language/territory/modifier with the database locale's codeset.
Solutions / Resolution
- Check
CLIENT_LOCALE/DB_LOCALE's values, per the official guidance. - Check the locale passed to
SET COLLATION, per the official guidance, if that statement was in use. - Check the session's default locale file is available if using
SET NO COLLATION, per the official guidance. - Check
INFORMIXDIRpoints to a valid installation directory, per the official guidance. - Confirm client and database locale compatibility on connection, per the official
guidance, checking for a matching
lg_tr.codeset@modlocale on the server.
Examples
Checking locale environment variables
$ env | grep -E 'CLIENT_LOCALE|DB_LOCALE|INFORMIXDIR'
Diagnostic Checks
- Check
CLIENT_LOCALE,DB_LOCALE, andINFORMIXDIR, and confirm a matching locale exists on the server for the client/database combination.
Related Errors / Related Topics
- -23107 — "DBLANG and CLIENT_LOCALE environment variables are incompatible." A
related locale-configuration error, on
DBLANG/CLIENT_LOCALEmismatch specifically. - -23109 — "Invalid locale specification." A related locale-initialization error, on composing the NLS locale's internal categories rather than loading them.
Locale categories couldn't be loaded due to an invalid locale value — check
CLIENT_LOCALE/DB_LOCALE/INFORMIXDIR.