大家好:希望有人碰到过类似问题
在AIX 5.3 下pro*c连接数据库的时候,
SQLCODE-12705        ,SQLSTATEORA-12705: Cannot access NLS data files or invalid environment specifi
这个需要设置主机的nls_lang和数据库的nls_lang吗?

解决方案 »

  1.   

    ORA-12705 invalid or unknown NLS parameter value specifiedCause: There are two possible causes: Either an attempt was made to issue an ALTER SESSION statement with an invalid NLS parameter or value; or the NLS_LANG environment variable contains an invalid language, territory, or character set.Action: Check the syntax of the ALTER SESSION statement and the NLS parameter, correct the syntax and retry the statement, or specify correct values in the NLS_LANG environment variable. For more information about the syntax of the ALTER SESSION statement, see the Oracle9i SQL Reference.
      

  2.   

    在主机上执行一下:
    unset nls_lang
    再试试。
      

  3.   

    谢谢你,yixilan
    取消了这个变量是可以连接的,但是如果生产环境也有这个变量的话,而且不能取消这个变量的设置,而且数据库也不能修改语言变量,那么有什么好的解决办法,或者对应转换呢?
      

  4.   

    我们原来做项目的时候,也是报这个错,后来是在编译的脚本里执行unset LANG,
    也就是说只在编译的时候,才unset,而实际上并不会影响主机的环境变量的设置。
    系统实际运行的时候,是没什么问题的。至于其它的方法,我没有用过。
      

  5.   

    直接设置主机ls_lang与数据库保持一致.
    客户端如果有安装oracle客户端,修改注册表中的nls_lang键值与数据库一致.希望能帮到你.