加入收藏 | 设为首页 | 会员中心 | 我要投稿 南京站长网 (https://www.025zz.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Unix > 正文

Oracle表无法expdp,ORACLE 11

发布时间:2022-10-15 21:33:40 所属栏目:Unix 来源:网络
导读: 今天在ORACLE RAC上使用expdp的parallel参数时报错。
OS环境:HP UNIX
数据库版本:oracle 11.2.0.4.0 RAC
导出脚本如下:
expdp test02/test_1tablespaces=test parallel=4 directory=exp

今天在ORACLE RAC上使用expdp的parallel参数时报错。

OS环境:HP UNIX

数据库版本:oracle 11.2.0.4.0 RAC

导出脚本如下:

expdp test02/test_1tablespaces=test parallel=4 directory=expdp_dir dumpfile=TEST_20140307.dmp logfile=TEST_20140307.log

导出时日志中报错信息如下:

ORA-31693: 表数据对象 "TESET2"."SUM_ORDER_INFO":"P_201305" 无法加载/卸载并且被跳过, 错误如下:

ORA-31617: 无法打开要写入的转储文件 "/backup/TEST_20140307.dmp"

ORA-19505: 无法识别文件"/backup/TEST_20140307.dmp"

ORA-27037: 无法获得文件状态

HPUX-ia64 Error: 2: No such file or directory

Additional information: 3

这个导出脚本是我之前到了n次的脚本,之前也是在相同的服务器,相同哦数据库下导出的,之前这么做就是为了演练那天晚上的迁移,以防止出现异常情况。

唯一的区别就是这次我添加了一个参数:parallel=4,也许就是这个参数导致的。但是我之前在10g的数据库上也使用过这个参数,当时非常的顺利unix数据库,为何11g就不行了呢。查看oracle11g的官方文档:

Using PARALLEL During An Export In An Oracle RAC Environment

In an Oracle Real Application Clusters (Oracle RAC) environment, if an export operation has PARALLEL=1, then all Data Pump processes reside on the instance where the job is started. Therefore, the directory object can point to local storage for that instance.

If the export operation has PARALLEL set to a value greater than 1, then Data Pump processes can reside on instances other than the one where the job was started. Therefore, the directory object must point to shared storage that is accessible by all instances of the Oracle RAC.

看来是导出文件的目录不是两个节点共享的原因,/backup只在节点1上挂载,节点2上没有。如果/backup在两个节点共享,就不会出现这样的错误。但是现在只能在单实例上操作。查看expdp的help,发现有个参数cluster。这个参数可以控制是否采用多实例导出。设置cluster=n后,即:

expdp test02/test_1tablespaces=test parallel=4 cluster=ndirectory=expdp_dir dumpfile=TEST_20140307.dmp logfile=TEST_20140307.log

执行后导出正常。没有报错!

在后面的导入过程也同样设置这个参数,导入正常!问题解决。保证了在规定的时间内完成数据库迁移。

(编辑:南京站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章