oracle导入命令impdp中cluster选项的作用 您所在的位置:网站首页 00101什么意思 oracle导入命令impdp中cluster选项的作用

oracle导入命令impdp中cluster选项的作用

2024-04-04 23:08| 来源: 网络整理| 查看: 265

oracle导入命令impdp中cluster选项的作用 发现问题

同事反映在使用oracle的impdp命令导入的时候,报以下错误:

最开始以为目录不正确,在数据库中使用命令select * from dba_directories查看directory的路径是正确的,dumpfile文件也确实在正确的目录下。再排查目录的权限也是正确的。

找出原因

这时候,另外一个同事也做了同样的导入动作,但是并没有报错。经过对比,发现没有出现问题的同事加了一个参数cluster=N。那肯定是这个参数的问题,使用命令impdp -help,得到如下解释:

CLUSTER Utilize cluster resources and distribute workers across the Oracle RAC [YES]. --通过Oracle RAC来利用集群的资源和分布的工人(工人应该就是指实例,但是极其笼统,反正我是没看出来啥意思)

虽然没看明白啥意思,但是可以定位到因为是RAC的原因导致的。继续找oracle rac cluster相关的关键字,找到如下描述:

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.

在cluster=n的时候,多个并行使用的是同一个实例进行导出和导入。但是如果cluster=y的时候,如果没开并行,使用一个实例,如果开了并行,这时候,会使用多个实例。但是directory并不是在一个共享目录中,因此另外一个实例会因为找不到directory而报错。

解决方法 cluster=n和parallel=10组合,开并行,但是关闭集群导入导出。 cluster=y和parallel=1,关闭并行,可以打开集群导入导出,但是这是没有意义的,即使打开,也没有起效。 cluster=y和parallel=10和directory在共享目录上,可以同时使用集群导入和并行。


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有