Linux中客户端设置编码:
export NLS_LANG=”AMERICAN_AMERICA.UTF8”
Oracle数据库修改字符集:
[root@oracledb ~]# su - oracle
[oracle@oracledb ~]$ sqlplus / as sysdba
sql*Plus: Release 11.2.0.4.0 Production on Sun Jan 24 10:13:16 2016
Copyright (c) 1982,2013,Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning,OLAP,Data Mining and Real Application Testing options
sql> set linesize 200
sql> select * from nls_database_parameters where parameter = ‘NLS_CHARACTERSET’;
PARAMETER VALUE
NLS_CHARACTERSET WE8MSWIN1252
sql> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sql> startup mount
ORACLE instance started.
Total System Global Area 2.0444E+10 bytes
Fixed Size 2262088 bytes
Variable Size 1.0469E+10 bytes
Database Buffers 9932111872 bytes
Redo Buffers 40267776 bytes
Database mounted.
sql> alter session set sql_trace=true;
Session altered.
sql> alter system enable restricted session;
System altered.
sql> show parameter job_queue_processes;
NAME TYPE VALUE
job_queue_processes integer 1000
sql> alter system set aq_tm_processes=0;
System altered.
sql> alter database open;
Database altered.
sql> alter database character set INTERNAL_USE AL32UTF8;
Database altered.
sql> select * from nls_database_parameters where parameter = ‘NLS_CHARACTERSET’;
PARAMETER VALUE
NLS_CHARACTERSET
AL32UTF8
sql> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sql> startup mount
ORACLE instance started.
Total System Global Area 2.0444E+10 bytes
Fixed Size 2262088 bytes
Variable Size 1.0469E+10 bytes
Database Buffers 9932111872 bytes
Redo Buffers 40267776 bytes
Database mounted.
sql> alter system set job_queue_processes=1000;
System altered.
sql> alter database open;
Database altered.
sql> select * from nls_database_parameters where parameter=’NLS_CHARACTERSET’;
PARAMETER VALUE
NLS_CHARACTERSET
AL32UTF8
sql> show parameter job_queue_processes;
NAME TYPE VALUE
job_queue_processes integer 1000