欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

ORACLE导入导出后发生中文乱码的原因及解决办法

发布时间:2025/5/22 编程问答 37 豆豆
生活随笔 收集整理的这篇文章主要介绍了 ORACLE导入导出后发生中文乱码的原因及解决办法 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

从数据库服务器上使用exp导出时显示如下:

[oracle@kf15-1]:/users/oracle>$ exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_unix.dmp satistics=none buffer=1000000Export: Release 10.2.0.4.0 - Production on 星期四 8月 26 16:37:08 2010Copyright (c) 1982, 2007, Oracle. All rights reserved.连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已导出 ZHS16CGB231280 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径... . . 正在导出表 TABLE_NAME导出了 11174 行 成功终止导出, 没有出现警告。

 

=================================================================

 

 从数据库客户端上使用exp导出时显示如下:

C:/Documents and Settings/user>exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_win.dmp statistics=none buffer=1000000Export: Release 10.2.0.1.0 - Production on 星期四 8月 26 16:40:31 2010Copyright (c) 1982, 2005, Oracle. All rights reserved.连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集 服务器使用 ZHS16CGB231280 字符集 (可能的字符集转换)即将导出指定的表通过常规路径... . . 正在导出表 TABLE_NAME导出了 11174 行 成功终止导出, 没有出现警告。

 

=================================================================

 

 其中有一段“可能的字符集转换”,原因在于数据库软件安装时使用缺省字符集ZHS16GBK,而服务器端在建库的时候将字符集改成了非缺省的ZHS16CGB231280,客户端没有艰苦的步骤,所以仍使用ZHS16GBK。

在Windows下修改oracle使用字符集 的方法为:

打开注册表;选择HKEY_LOCAL_MACHINE —> ORACLE —> KEY_OraClient10g_home1中的NLS_LANG,将其键值“SIMPLIFIED CHINESE_CHINA.ZHS16GBK”改为“SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280”。

 

=================================================================

 

修改过客户端字符集以后,从数据库客户端上使用exp导出时显示如下:

C:/Documents and Settings/user>exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_win.dmp statistics=none buffer=1000000Export: Release 10.2.0.1.0 - Production on 星期四 8月 26 17:15:15 2010Copyright (c) 1982, 2005, Oracle. All rights reserved.连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已导出 ZHS16CGB231280 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径... . . 正在导出表 TABLE_NAME导出了 11174 行 成功终止导出, 没有出现警告。

总结

以上是生活随笔为你收集整理的ORACLE导入导出后发生中文乱码的原因及解决办法的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。