ITPub博客

首页 > 数据库 > Oracle > imp导入乱码解决

imp导入乱码解决

原创 Oracle 作者:colin_cwc 时间:2017-12-29 09:51:10 0 删除 编辑

在imp导入时,发现两个数据库的字符集是一样的,但imp导入后,注释是乱码:


SQL> SQL> SQL> select userenv('language') from dual;


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


报错如下:
Import: Release 10.2.0.4.0 - Production on Fri Dec 29 09:40:26 2017


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




Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
IMP-00017: following statement failed with ORACLE error 1917:



检查发现客户端的编码不一样,于是在.bash_profile配置
在imp的客户端配置:
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

问题解决。

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

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

注册时间:2017-01-17

  • 博文量
    20
  • 访问量
    18953