我在 CentOS 7 VM 的目录下安装了 ASE-15 /opt/sybase
,然后我跑去SYBASE.sh
设置环境变量,但它不起作用,因为当我echo $SYBASE
在 OS 上输入时它什么也没输出。所以我通过cat SYBASE.env >> ~/.bash_profile
在下面的 SYBASE.env 中键入内容来手动设置环境变量。
[sybase@localhost sybase]$ cat /opt/sybase/SYBASE.env
SYBASE_JRE7_32=/opt/sybase/shared/JRE-7_0_7_32BIT
SYBASE_JRE7=/opt/sybase/shared/JRE-7_0_7_64BIT
SYBASE_JRE7_64=/opt/sybase/shared/JRE-7_0_7_64BIT
SYBASE_OCS=OCS-15_0
INCLUDE=/opt/sybase/OCS-15_0/include:$INCLUDE
LIB=/opt/sybase/OCS-15_0/lib:$LIB
PATH=/opt/sybase/OCS-15_0/bin:$PATH
LD_LIBRARY_PATH=/opt/sybase/OCS-15_0/lib:/opt/sybase/OCS-
15_0/lib3p64:/opt/sybase/OCS-15_0/lib3p:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/opt/sybase/DataAccess/ODBC/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/opt/sybase/DataAccess64/ODBC/lib:$LD_LIBRARY_PATH
PATH=/opt/sybase/DBISQL/bin:$PATH
PATH=/opt/sybase/SCC-3_2/bin:$PATH
SCC_JAVA_HOME=/opt/sybase/shared/JRE-7_0_7_64BIT
SYBASE=/opt/sybase
SYBASE_ASE=ASE-15_0
PATH=/opt/sybase/ASE-15_0/bin:/opt/sybase/ASE-15_0/install:$PATH
SYBROOT=/opt/sybase
SYBASE_JRE_RTDS=/opt/sybase/shared/JRE-7_0_7_64BIT
LD_LIBRARY_PATH=/opt/sybase/ASE-15_0/lib:$LD_LIBRARY_PATH
SYBASE_WS=WS-15_0
PATH=/opt/sybase/ASE-15_0/jobscheduler/bin:$PATH
[sybase@localhost sybase]$
但是,当我执行isql
cmd 连接 ASE-15 数据库时,出现以下错误。
[sybase@localhost sybase]$ isql
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 /home/sybase. Check the environment variable SYBASE if it is not the one you want!
Cannot access file /home/sybase/config/objectid.dat
An error occurred when attempting to allocate localization-related structures.
[sybase@localhost sybase]$
然后我输入echo $SYBASE
检查环境变量$SYBASE
是否正确。
[sybase@localhost sybase]$ echo $SYBASE
/opt/sybase
所以我想我已经指定了sybase主目录/opt/sybase
,为什么isql
命令find file objectid.dat
under/home/sybase/config
而不是/opt/sybase/config
?