如何导出oracle 字符集,Oracle10g数据库导入导出(跨字符集)

一导出:

#!/bin/bash

su - oracle -c "exp system/fakepass tables=$1 file=/data/$1.dmp"

[root@web oracle8i]# dmp album

Export: Release 10.1.0.3.0 - Production on 星期一 2月 5 01:56:55 2007

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

连接到: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production

With the Partitioning, OLAP and Data Mining options

已导出 ZHS16CGB231280 字符集和 AL16UTF16 NCHAR 字符集

服务器使用 ZHS16GBK 字符集 (可能的字符集转换)

即将导出指定的表通过常规路径...

. . 正在导出表                           ALBUM导出了         590 行

EXP-00091: 正在导出有问题的统计信息。

EXP-00091: 正在导出有问题的统计信息。

EXP-00091: 正在导出有问题的统计信息。

导出成功终止, 但出现警告。

二导入

从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options 断开

[oracle@dev ~]$ imp system/fit2007 file=blogcat.dmp tables=blogcat

Import: Release 10.2.0.1.0 - Production on 星期一 2月 5 01:44:39 2007

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

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

经由常规路径由 EXPORT:V10.01.00 创建的导出文件

已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入

导入服务器使用 AL32UTF8 字符集 (可能的字符集转换)

导出客户机使用 ZHS16CGB231280 字符集 (可能的字符集转换)

. 正在将 SYSTEM 的对象导入到 SYSTEM

. 正在将 SYSTEM 的对象导入到 SYSTEM

. . 正在导入表                       "BLOGCAT"导入了        1938 行

成功终止导入, 没有出现警告。

[oracle@dev ~]$ imp system/topsecret file=blogcat.dmp tables=blogcat

三总结

2个oracle10g服务器,导出的在北京, 版本10.1.0.3.0, 使用 ZHS16GBK 字符集。

导入的在宝鸡,临时开发测试用,版本 10.2.0.1.0,AL32UTF8 字符集。

主要问题是2个服务器字符集不同,解决的关键是:在导入前,设置导入机器的NLS_LANG 与导出机器的NLS_LANG相同,为Simplified Chinese_china.ZHS16GBK

全部导出的dmp文件有1.8G,学校服务器带宽有限,所以采用了导出常用数据表的最新数据方法。

转:http://www.zhuoda.org/hofman/78332.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值