今天测试EXPDP 的FLASHBACK_SCN发现也是读取的UNDO SEGMENT
通过ORA-ROWSCN知道当时行变化对应的SCN:
SQL> select ora_rowscn,ename from hr.emp2 where rownum select count(*) from hr.emp2;
COUNT(*)
----------
57344
表里总共有57344行.
SQL> select * from dba_directories
OWNER DIRECTORY_NAME
DIRECTORY_PATH
----- ------------------------------ ---------------------------------------------------------------
SYS CURRLOGDIR
D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEVDB\
SYS LOGDIR
+DISK_GROUP1/devdb/logfile
SYS SUBDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Sep
SYS XMLDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\
SYS MEDIA_DIR
D:\oracle\product\10.2.0\db_1\demo\schema\product_media\
SYS LOG_FILE_DIR
D:\oracle\product\10.2.0\db_1\demo\schema\log\
SYS WORK_DIR
C:\ADE\aime_10.2_nt_push\oracle/work
SYS DATA_FILE_DIR
D:\oracle\product\10.2.0\db_1\demo\schema\sales_history\
SYS DATA_PUMP_DIR
D:\oracle\product\10.2.0\admin\devdb\dpdump\
SYS ADMIN_DIR
C:\ADE\aime_10.2_nt_push\oracle/md/admin
已选择10行。
查询目前的目录
C:\Documents and Settings\oracle>expdp hr/hr dumpfile=expdp_hr.dmp directory=cur
rlogfir schemas=hr include=table:EMP2 flashback_scn=255051640 logfile=expdp.log
Export: Release 10.2.0.1.0 - Production on 星期二, 26 2月, 2008 10:37:02
Copyright (c) 2003, 2005, Oracle.All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: 操作无效
ORA-39070: 无法打开日志文件。
ORA-39087: 目录名 CURRLOGFIR 无效
SQL> GRANT ALL ON DIRECTORY CURRLOGDIR TO HR;
授权成功。
C:\Documents and Settings\oracle>expdp hr/hr dumpfile=expdp_hr.dmp directory=cur
rlogdir schemas=hr include=table:\"in (\'EMP2\')\" flashback_scn=255051640 conte
nt=data_only logfile=expdp.log
Export: Release 10.2.0.1.0 - Production on 星期二, 26 2月, 2008 10:44:04
Copyright (c) 2003, 2005, Oracle.All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
自动启用 FLASHBACK 以保持数据库完整性。
启动 "HR"."SYS_EXPORT_SCHEMA_01":hr/******** dumpfile=expdp_hr.dmp directory=c
urrlogdir schemas=hr include=table:"in (\'EMP2\')" flashback_scn=255051640 conte
nt=data_only logfile=expdp.log
正在使用 BLOCKS 方法进行估计...
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 2.812 MB
ORA-31693: 表数据对象 "HR"."EMP2" 无法加载/卸载并且被跳过, 错误如下:
ORA-02354: 导出/导入数据时出错
ORA-01466: 无法读取数据 - 表定义已更改
已成功加载/卸载了主表 "HR"."SYS_EXPORT_SCHEMA_01"
******************************************************************************
HR.SYS_EXPORT_SCHEMA_01 的转储文件集为:
D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEVDB\EXPDP_HR.DMP
作业 "HR"."SYS_EXPORT_SCHEMA_01" 已经完成, 但是有 1 个错误 (于 10:44:28 完成)
|