zoukankan      html  css  js  c++  java
  • oracle导入命令impdp中cluster选项的作用

    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而报错。

    解决方法

    1. cluster=nparallel=10组合,开并行,但是关闭集群导入导出。
    2. cluster=yparallel=1,关闭并行,可以打开集群导入导出,但是这是没有意义的,即使打开,也没有起效。
    3. cluster=yparallel=10directory在共享目录上,可以同时使用集群导入和并行。
  • 相关阅读:
    【重点】Java大厂面试10个知识点汇总
    TEC-2机微程序设计
    Component 'TABCTL32.OCX'错误的处理方法
    Azure DevOps的使用入门
    Mac + VMware Fusion + Windows 11尝鲜
    Golang接口类型-下篇
    Golang接口类型-上篇
    基于Python实现原生的登录验证码
    一套帮助你理解C语言的测试题(转)
    KMP算法详解
  • 原文地址:https://www.cnblogs.com/monkey6/p/14410808.html
Copyright © 2011-2022 走看看