• 数据泵 expdp 参数 consistent=y


    exp 导出时 可以添加 consistent 参数,在10g、11g expdp也可以添加这个参数来导出数据。


    [oracle@bmsdb ~]$ expdp abc/abc schemas=abc directory=EXPDPIMPDPDIR dumpfile=abc_%U.dmp parallel=2 job_name=abcexpdpimpdpconsistent=y


    Export: Release 11.2.0.3.0 - Production on Tue Mar 22 08:22:06 2016


    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Legacy Mode Active due to the following parameters:
    Legacy Mode Parameter: "consistent=TRUE" Location: Command Line, Replaced with: "flashback_time=TO_TIMESTAMP('2016-03-22 08:22:06', 'YYYY-MM-DD HH24:MI:SS')"
    Legacy Modehas set reuse_dumpfiles=true parameter.
    Starting "ABC"."USRAEXPDPIMPDP":  ABC/******** schemas=ABC directory=EXPDPIMPDPDIR dumpfile=abc_%U.dmp parallel=2 job_name=abcexpdpimpdp flashback_time=TO_TIMESTAMP('2016-03-22 08:22:06', 'YYYY-MM-DD HH24:MI:SS') reuse_dumpfiles=true 
    Estimate in progress using BLOCKS method...


    可以看到Oracle检测到传统参数  consistent=y  会转换为 flashback_time=TO_TIMESTAMP('2016-03-22 08:22:06', 'YYYY-MM-DD HH24:MI:SS')

    使用的是 flashback query 技术,如果 undo_retention 设置过小或者 没有  retention guarantee ,会报ORA-01555错误,


    如下

    ORA-31693: Table data object "ABC"."XXXX" failed to load/unload and is being skipped due to error:
    ORA-02354: error in exporting/importing data
    ORA-01555: snapshot too old: rollback segment number 42 with name "_SYSSMU42$" too small
    ORA-00604: error occurred at recursive SQL level 3
    ORA-08180: no snapshot found based on specified time
    ORA-06512: at "SYS.TIMESTAMP_TO_SCN", line 1


    相同效果的还有 flashback_scn= ,对应的数值从 dbms_flashback.get_system_change_number()  获取

    select dbms_flashback.get_system_change_number() 

    from dual;


    --------------------

    备注:

      consistent = 

      flashback_time=

      flashback_scn=









  • 相关阅读:
    Sql中CHARINDEX用法
    当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式
    Windows Server 2012 R2安装.NET4.7.2服务问题集合
    详细实例全面解析SQL存储过程
    MySQL 存储过程
    华为远程登陆配置
    数据平台环境部署(mysql、docker、nginx)
    ISIS的路由渗透
    华为模拟器的安装失败(出现40、41、42代码错误,Oracle VM VirtualBox安装出现严重错误以及一直处于开机状态)
    华为模拟器配置动态ospf--虚拟链路、rip重分布、static重分布
  • 原文地址:https://www.cnblogs.com/ctypyb2002/p/9793186.html
Copyright © 2020-2023  润新知