问题
When I am trying to run sybase query through isql syntex it is giving below error.
Error -
"The context allocation routine failed when it tried to load localization files!! One or more following problems may caused the failure
Your sybase home directory is C:\Sybase. Check the environment variable SYBASE if it is not the one you want! Using locale name "en_US.UTF-8" defined in environment variable LANG Locale name "en_US.UTF-8" doesn't exist in your C:\Sybase\locales\locales.dat file An error occurred when attempting to allocate localization-related structures. "
I checked the environment path variable which is correct.
回答1:
I found that if I run
unset LANG
before running isql, then isql works as expected.
回答2:
If above is the output, then it means that the environmental variable is not set properly. In order to set the environment variable - go to sybase directory
$ cd sybase/
and set environment variable
$ **export LANG=en_IN.UTF-8**
And then start the server.
$ cd sybase/
Now go to OCS-16_0 folder
$ cd OCS-16_0/
And then connect to the server.
$ bin/isql64 -Usa -SSYBASEASE
where
- sa is my user
- SYBASEASE is my Sybase server name
It will ask for password. enter it, and it will connect to the sql shell.
来源:https://stackoverflow.com/questions/22235042/not-able-to-run-isql-on-cygwin