一、 问题
安装Oracle 11g 时候,没有选择字符集,只是默认的AMERICAN_AMERICA.WE8MSWIN1252 导致用navicat查询的时候,中文是乱码
二、解决办法
centos 用oracle 账户登录 输入
sqlplus
sys as sysdba
shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.
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.
alter system enable restricted session;
System altered.
show parameter job_queue_processes;
NAME TYPE VALUE
job_queue_processes integer 1000
show parameter aq_tm_processes;
NAME TYPE VALUE
aq_tm_processes integer 0
alter system set job_queue_processes=0;
System altered.
alter database open ;
Database altered.
alter database character set internal_use ZHS16GBK;
Database altered.
select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER
VALUE
NLS_CHARACTERSET ZHS16GBK
shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.
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.
alter system set job_queue_processes=1000;
System altered.
alter database open;
Database altered.
总结
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。