1. 程式人生 > >linux 修改oracle中文亂碼

linux 修改oracle中文亂碼

linux 安裝oracle預設語言為:
AMERICAN_AMERICA.WE8MSWIN1252 

此語言中文展示位亂碼。

通過oracle登入linux系統後進行如下操作:


修改方法(以改成UTF8為例)
以系統DBA許可權登入sqlplus
$ sqlplus / as sysdba;
select userenv('language') from dual;
   如果是:AMERICAN_AMERICA.WE8MSWIN1252  則需要調整編碼格式為:AL32UTF8
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter system enable restricted session;
SQL> alter system set job_queue_processes=0;
SQL> alter database open;
SQL> alter database character set internal_use AL32UTF8;
SQL> shutdown immediate;
SQL> startup
SQL>alter system disable restricted session;