摘自:http://blog.itpub.net/26839123/viewspace-722863/
ORA-12705: Cannot access NLS data files or invalid environment specified
ORA-12705: Cannot access NLS data files or invalid environment specified
今天在本机上用sys登录数库时,居然报了以上错误,还好是自己测试机。
ORA-12705: Cannot access NLS
data files or invalid eC:\Users\admin>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon May 7 09:21:01 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12705: Cannot access NLS data files or invalid environment specified
ORA-12705: Cannot access NLS data files or invalid environment specified
Enter user-name:nvironment specified
12705, 00000, "Cannot access NLS data files or invalid environment specified"
// *Cause: Either an attempt was made to issue an ALTER SESSION command
// with an invalid NLS parameter or value; or the environment
// variable(s) NLS_LANG, ORA_NLSxx, or ORACLE_HOME was incorrectly
// specified, therefore the NLS data files cannot be located.
// *Action: Check the syntax of the ALTER SESSION command and the NLS
// parameter, correct the syntax and retry the statement, or
// specify the correct directory path/values in the environment
// variables.
解决办法:
1.检查以下变量是否设置正确(invalid environment specified)
NLS_LANG, ORA_NLSxx, or ORACLE_HOME
2.检查$ORACLE_HOME/nls/data目录中的nlb文件(NLS data files)是否损坏,可以先把文件 备份,再从其他相同的环境中copy这些文件
解决方法1排除了,原因是以前是好好的最近也未曾改过环境变量.
查找$ORACLE_HOME目录有了惊人的发现,让俺既是惊喜又是振奋,惊喜的是终于发现了NLS目录丢失了,振奋的是自己还有一台机器也安装有Oracle11g. 看来这年头操作系统也靠不近了,不用说copy一份过来。
C:\Users\admin>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 5月 7 09:26:47 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
ORACLE 例程已经启动。
Total System Global Area 2104479744 bytes
Fixed Size 2177368 bytes
Variable Size 1191184040 bytes
Database Buffers 905969664 bytes
Redo Buffers 5148672 bytes
数据库装载完毕。
数据库已经打开。
---------------------------------------------------------------------------------------------------------------------------
另:客户端如果有繁体等显示乱码问题可以试试下面:
"TRADITION CHINESE_TAIWAN.ZHT16BIG5" 繁体中文
"SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
ZHS16CGB231280
Fixed Size 2177368 bytes
Variable Size 1191184040 bytes
Database Buffers 905969664 bytes
Redo Buffers 5148672 bytes
数据库装载完毕。
数据库已经打开。
---------------------------------------------------------------------------------------------------------------------------
另:客户端如果有繁体等显示乱码问题可以试试下面:
"TRADITION CHINESE_TAIWAN.ZHT16BIG5" 繁体中文
"SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
ZHS16CGB231280
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/76103/viewspace-1437296/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/76103/viewspace-1437296/