标签:oracle 字符集 nls_nchar_characterset nls_lang
select * from v$nls_parameter会显示nls_characterset和nls_nchar_characterset的值
修改字符集nls_characterset和nls_nchar_characterset值的方法如下:
1,修改nls_characterset:
sqlplus "/ as sysdba"
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP MOUNT
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> ALTER DATABASE OPEN
SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE UTF8;-->表示字符集格式修改为UTF8
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
其中INTERNAL_USE表示跳过字符集检查;
2,修改nls_nchar_characterset:
sqlplus "/ as sysdba"
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP MOUNT
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> ALTER DATABASE OPEN
SQL> ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE UTF8;
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
3,修改linux下的LANG参数:
vi /etc/sysconfig/i18n--->修改LANG的参数
4,修改linux下的NLS_LANG参数:
cd /
vi .bash_profile
修改EXPORT NLS_LANG的参数设置
修改完毕退出后,命令行下输入以下命令重置环境
. .bash_profile
标签:oracle 字符集 nls_nchar_characterset nls_lang
原文地址:http://ciscle.blog.51cto.com/6219171/1633494