IMP-00019錯誤與修改oracle11g字符集

jichengjie發表於2016-07-28
環境是cesos6.4  oracle11gR2在imp匯入資料時報錯:
IMP-00019: row rejected due to ORACLE error 12899
IMP-00003: ORACLE error 12899 encountered
ORA-12899: value too large for column "XJ"."ALL_GOODS_DECL"."DEST_NAME" (actual: 51, maximum: 50)
Column 1 512104
Column 2 Q650300114000620
Column 3 650300114020889
Column 4 650300114021175E
Column 5 6500910018
Column 6 6500700148
Column 7 29-SEP-2014:00:00:00
Column 8 6
Column 9 
Column 10 ASIA STAR METAL TRADING INC
Column 11 ***

經查資料庫字符集是AL32UTF8,下面修改為ZHS16GBK


[oracle@xen1607250002 config]$ sqlplus  /nolog


SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 27 14:34:32 2016


Copyright (c) 1982, 2009, Oracle.  All rights reserved.


SQL> connect  / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.


Total System Global Area 2388422656 bytes
Fixed Size                  2215664 bytes
Variable Size            1358954768 bytes
Database Buffers         1006632960 bytes
Redo Buffers               20619264 bytes
Database mounted.
Database opened.
SQL> shutdown  immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup  mount;
ORACLE instance started.


Total System Global Area 2388422656 bytes
Fixed Size                  2215664 bytes
Variable Size            1358954768 bytes
Database Buffers         1006632960 bytes
Redo Buffers               20619264 bytes
Database mounted.
SQL> alter session set sql_trace=true; 


Session altered.


SQL> alter system  enable  restricted  session;


System altered.


SQL> alter system  set job_queue_processes=0;


System altered.


SQL> alter system  set aq_tm_processes=0;


System altered.


SQL> alter database open;


Database altered.


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




SQL> ALTER database  character set INTERNAL_USE  ZHS16GBK;


Database altered.


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.


Total System Global Area 2388422656 bytes
Fixed Size                  2215664 bytes
Variable Size            1358954768 bytes
Database Buffers         1006632960 bytes
Redo Buffers               20619264 bytes
Database mounted.
Database opened.
SQL> select userenv('language') from dual;


USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

再次匯入正常,問題解決

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2122678/,如需轉載,請註明出處,否則將追究法律責任。

相關文章