导入数据到ORACLE遭遇ORA-12899错误

IMP-00019: row rejected due to ORACLE error12899
IMP-00003: ORACLE error 12899 encountered
ORA-12899: value too large for column"JRGAZX"."DTLMB"."CC" (actual: 66,maximum: 50)

初步断定是字符集问题,中文在UTF-8里占3个字节,ZHS16GBK里占2个字节,而源dmp文件字符集是ZHS16GBK的库到出来的,现在要导入到目标字符集为UFT-8的库里。

修改oracle 10g的字符集
Oracle
修改数据库字符集为:ZHS16GBK
查看服务器端字符集SQL > select * from V$NLS_PARAMETERS
修改:$sqlplus /nolog
SQL>conn / 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 ofold character set

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

可以执行下一步  跳转错误操作

SQL>ALTER DATABASE CHARACTER SET INTERNAL_USEZHS16GBK;
SQL>SHUTDOWN IMMEDIATE
SQL>STARTUP

再次用imp导入,就没有问题了。

你可能感兴趣的:(oracle)