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