原因
安装了多个Oracle相关软件,设置了不同的编码以及账户,安装了多个Oracle Client软件,在登录时可能会选择一个不正确的账户。
官方解释
For ORA-12705 errors caused by invalid NLS_LANG settings, you need to verify that it is "unset" at the system-level:
- Windows - The NLS_LANG must be unset in the Windows registry (re-named is best). Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it.
- Linux/UNIX - Here you simply issue the Linux command "unset NLS_LANG"
解决方法
1、按【win + R】,输入regedit,按【Ctrl + F】查找所有NLS_LANG,将其设置为
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
2、环境变量中加入NLS_LANG 值为SIMPLIFIED CHINESE_CHINA.ZHS16GBK
3、按【win + R】输入cmd, 然后输入
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK