数据泵 expdp 参数 consistent=y
2016-03-22 08:40
253 查看
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=
[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=
相关文章推荐
- 最大二分图匹配 邻接表优化
- bzoj 3225: [Sdoi2008] 立方体覆盖 题解
- 产品学习笔记4—需求的从0到1
- mysql 数据库引擎
- event对象和事件冒泡
- C# 该行已经属于还有一个表 的解决方法
- poj 2393 Yogurt factory
- Linux & Mac curl 命令行使用——POST&GET
- 稀疏矩阵的压缩存储与转置
- Android adb wifi连接调试
- 模拟实现new、delete和new[] 、delete[]
- 全局变量 局部变量 静态变量的区别
- scoiday1T3&&bzoj4445小凸想跑步
- s3c2440第一个流水灯驱动程序(JZ2440)
- (语法)内存地址和指针<一>
- Integer Inquiry(大数)
- 学习JS的第二天
- 桶排序
- update语句的执行步骤及commit语句的执行顺序
- Rebirth 认认真真的成为Android大拿!