1: Failure to reproduce
First, connect to the Oracle database under the Linux shell
$sqlplus /nolog
SQL>conn /as sysdba
SQL>startup (after the environment variable is set, the database will start automatically)
SQL>If there is a problem, it can almost be displayed here, that is One by one, if you use remote software to connect, it may be a block.
Two: Solution
Exit sqlplus, check the environment variable file
ls -la in the Oracle home directory,
mine is .bash_profile
vim .bash_profile Add NLS_LANG=AMERICAN_AMERICA.ZHS16GBK export NLS_LANG
to the following line to exit vim three: $../.bash_profile (reload environment variables) and try connecting to the database, it should be no problem, there is a premise here, that is to install oracle At this time, the selected character set is AMERICAN_AMERICA.ZHS16GBK If it is another character set, try a similar method. Similarly, set the compatible language and font in /etc/sysconfig/i18n. select userenv('language') from The result displayed by dual is: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
那就把字符集改写成中文的NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
==================================
2011、7、11最新总结,最近的情况让我对上述结论有了新的看法,安装oracle数据库的经历少说有20次了,从11gR 1 32位跟64位,到11gR2 64位.装几次就会遇到不同的问题.R2 64位版本貌似对系统的要求比较高,内存资源池的共享区要求貌似不小.
总之,今天有得到个心得结论.
上面说的都不完全对,要自己试试以后才知道.这装好之后,select userenv(’language’) from dual; 结果就是简体中文,一点都没错我装的时候就是选得简体中文,这样报错之后能看个明白.
可是不管我怎么变更shell下的语言,都是显示乱码,郁闷至极的时候我就把NLS_LANG=AMERICAN_AMERICA.ZHS16GBK结果好了.
The garbled problem of Oracle for Linux sqlplus
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326444795&siteId=291194637
Ranking