toad连接数据库
select userenv('language') from dual;
显示SIMPLIFIED CHINESE_CHINA.AL32UTF8
需要修改为 SIMPLIFIED CHINESE_CHINA.ZHS16GBK
执行
ALTER DATABASE CHARACTER SET ZHS16GBK;
报错 ORA-12712: new character set must be a superset of old character set
--ssh连接数据库
su - oracle --切换到oracle 用户
sqlplus /as sysdba
>shutdown immediate; 停止数据库
>startup mount; 把database重启到可更改状态 装载数据库,打开控制文件
>ALTER SESSION SET SQL_TRACE=TRUE;
>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 ZHS16GBK;
ORA-12712: new character set must be a superset of old character set
RROR at line 1:
结果报错,提示新字符集必须是老字符集的超集。
于是强制转换
>ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
>shutdown immediate; 停止数据库
>startup 启动数据库