一、 问题
安装Oracle 11g 时候,没有选择字符集,只是默认的AMERICAN_AMERICA.WE8MSWIN1252 导致用navicat查询的时候,中文是乱码@H_403_3@
二、解决办法
centos 用oracle 账户登录 输入@H_403_3@
sqlplus
sys as sysdba
shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.@H_403_3@
startup mount
ORACLE instance started.@H_403_3@
Total System Global Area 3290345472 bytes Fixed Size 2180224 bytes Variable Size 1795165056 bytes Database Buffers 1476395008 bytes Redo Buffers 16605184 bytes Database mounted.@H_403_3@
alter system enable restricted session;
System altered.@H_403_3@
show parameter job_queue_processes;
NAME TYPE VALUE@H_403_3@
job_queue_processes integer 1000@H_403_3@
show parameter aq_tm_processes;
NAME TYPE VALUE@H_403_3@
aq_tm_processes integer 0@H_403_3@
alter system set job_queue_processes=0;
System altered.@H_403_3@
alter database open ;
Database altered.@H_403_3@
alter database character set internal_use ZHS16GBK;
Database altered.@H_403_3@
select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER
VALUE
NLS_CHARACTERSET ZHS16GBK@H_403_3@
shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.@H_403_3@
startup mount
ORACLE instance started.@H_403_3@
Total System Global Area 3290345472 bytes Fixed Size 2180224 bytes Variable Size 1795165056 bytes Database Buffers 1476395008 bytes Redo Buffers 16605184 bytes Database mounted.@H_403_3@
alter system set job_queue_processes=1000;
System altered.@H_403_3@
alter database open;
Database altered.@H_403_3@