ORA-12899: value too large for column

转自:https://www.cloudcared.cn/1771.html
导入数据时报错以下错误,这是因为原来的数据库是GBK的,每个汉字两个字节,但新数据库是UTF-8的,每个汉字是三个字节,导致超过长度了。
开始–>运行–>cmd,之后输入:“sqlplus /nolog”,进入"SQL>"的提示,按照下面给出的命令依次执行就可以了:

SQL>connect username/password 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 ZHS16GBK ;

ALTER DATABASE CHARACTER SET ZHS16GBK;

*ERROR at line 1:
ORA-12712: new character set must be a superset of old character set

报字符集不兼容,此时下INTERNAL_USE指令不对字符集超集进行检查:

SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;

SQL>SHUTDOWN IMMEDIATE;

SQL>STARTUP;

你可能感兴趣的:(数据库之Oracle)