A character set error was found after installing Oracle, so you need to modify the character set as follows:
System Environment: CentOS 6.5
Oracle Version: 10.2
1. Log in to the system and switch to Oracle user rights
# su-oracle
2. Then enter:
$ sqlplus/as SYSDBA
3. Oracle server-side Character set query
Sql> Select Userenv (' language ') from dual;
USERENV (' LANGUAGE ')----------------------------------------------------American_america. Zhs16gbk
From this we can see that the character set is ZHS16GBK
sql> Exit
4. Querying the character set of Oracle client side
$ echo $NLS _lang
If you find that the data you select is garbled, configure the client's character set to the same character set as the Linux operating system. If it is still garbled, it is possible that there is a problem with the data in the database, or there is a problem with the configuration of the Oracle server.
5. Server-side Character Set modification
To make a character set change by booting the database into restricted mode:
$ sqlplus "/as sysdba"
Sql> Conn/as SYSDBA
sql> shutdown Immediate
Sql> Startup Mount
sql> ALTER SYSTEM ENABLE RESTRICTED SESSION;
sql> ALTER SYSTEM SET job_queue_processes=0;
sql> ALTER SYSTEM SET aq_tm_processes=0;
sql> ALTER DATABASE open;
Sql> ALTER DATABASE character set Internal_use UTF8;
sql> shutdown Immediate
Sql> Startup
Sql> Exit
6. Client Side Character Set modification
Add or modify export nls_lang= American_america in the. Bash_profile in the/home/oracle and/root users directory. UTF8 "statement
$ vi/home/oracle/.bash_profile
#在最后加入如下代码并保存退出
export nls_lang= "American_america. UTF8 "
$ source/home/oracle/.bash_profile
Oracle 10g modified character set to UTF8