ITPub博客

首页 > 数据库 > Oracle > 字符集导致 ORA-00957: duplicate column name

字符集导致 ORA-00957: duplicate column name

原创 Oracle 作者:SnowDBA 时间:2015-01-15 16:48:56 0 删除 编辑
原库的字符集是ZHS16GBK,表中字段是中文名称,比如姓名,年龄等等。exp导出正常,在imp导入时遇到报错ORA-00957
内容如下:
nohup imp userid=system/oracle file=20150114.dmp fromuser=user1 touser=user1 buffer=10000000 tables=TB_SYS_EXCEL1 &

IMP-00017: following statement failed with ORACLE error 957:
 "CREATE TABLE "TB_SYS_EXCEL1" ("???" VARCHAR2(128), "???" NUMBER(18, 0) NOT N"
 "ULL ENABLE, "????" VARCHAR2(255) NOT NULL ENABLE, "????" VARCHAR2(255), "??"
 "?" VARCHAR2(13), "????" VARCHAR2(12), "????" VARCHAR2(22), "???????" VARCHA"
 "R2(6), "?????" VARCHAR2(6), "????" VARCHAR2(8))  PCTFREE 10 PCTUSED 40 INIT"
 "RANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TA"
 "BLESPACE "SDATA" LOGGING NOCOMPRESS"
IMP-00003: ORACLE error 957 encountered
ORA-00957: duplicate column name

解决方法:
$ export nls_lang=AMERICAN_AMERICA.ZHS16GBK

$ nohup imp userid=system/oracle file=20150114.dmp fromuser=user1 touser=user1 buffer=10000000 tables=TB_SYS_EXCEL1 &

$ tail -100f nohup.out

import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
.importing CDBOLD’s objects into CDBOLD
. . importing table           “TB_SYS_EXCEL1”          9527 rows imported
Import terminated successfully with warnings.


导入成功!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29047826/viewspace-1403125/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-06-21

  • 博文量
    223
  • 访问量
    1633600