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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。