小编给大家分享一下imp导入乱码怎么办,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
在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
问题解决。
以上是“imp导入乱码怎么办”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!