一、环境
操作系统:win10(Oracle服务端在本机)
编码格式:ZHS16GBK
需要改成的格式:UTF-8
二、修改步骤
sqlplus 用户名/密码 as sysdba
>shutdown immediate;
>startup mount;
>alter system enable restricted session;
>alter system set job_queue_processes=0;
>alter system set aq_tm_processes=0;
>alter database open;
>alter database character set utf8;
- 如果上一句执行报错:(ORA-12712: 新字符集必须为旧字符集的超集),执行:
>alter database character set internal_use utf8;
>shutdown immediate;
>startup;
三、查看修改后的编码格式
> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;