码迷,mamicode.com
首页 > 其他好文 > 详细

数据泵导出报错ORA-31693 ORA-02354 ORA-01466

时间:2020-02-16 13:24:19      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:cto   oracl   create   base   reserve   created   eth   flashback   starting   

1.Oracle数据泵导出schema时有报错:

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** flashback_scn=3072010 tables=t dumpfile=t.dmp logfile=t.log directory=expdp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 9 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-31693: Table data object "SCOTT"."T" failed to load/unload and is being skipped due to error:
ORA-02354: error in exporting/importing data
ORA-01466: unable to read data - table definition has changed
Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
  /home/oracle/expdp/t.dmp
Job "SCOTT"."SYS_EXPORT_TABLE_01" completed with 1 error(s) at 00:20:06

2.经过分析报错:

ORA-31693: Table data object "SCOTT"."T" failed to load/unload and is being skipped due to error:

说明是T表导出报错

 

ORA-01466: unable to read data - table definition has changed

可以分析是该表现在的表结构和导出时该表的结构发生了变化

 

 

3.重现该报错(测试环境还原场景)

SYS@PROD4 >conn scott/tiger;
Connected.
SCOTT@PROD4 >select current_scn from v$database;

CURRENT_SCN
-----------
    3072010

SCOTT@PROD4 >desc t;
 Name                               Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 OWNER                                VARCHAR2(30)
 OBJECT_NAME                            VARCHAR2(128)
 SUBOBJECT_NAME                         VARCHAR2(30)
 OBJECT_ID                            NUMBER
 DATA_OBJECT_ID                         NUMBER
 OBJECT_TYPE                            VARCHAR2(19)
 CREATED                            DATE
 LAST_DDL_TIME                            DATE
 TIMESTAMP                            VARCHAR2(19)
 STATUS                             VARCHAR2(7)
 TEMPORARY                            VARCHAR2(1)
 GENERATED                            VARCHAR2(1)
 SECONDARY                            VARCHAR2(1)
 NAMESPACE                            NUMBER
 EDITION_NAME                            VARCHAR2(30)

 

SCOTT@PROD4 >alter table t add country varchar2(20);

Table altered.

SCOTT@PROD4 >desc t;
 Name                               Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 OWNER                                VARCHAR2(30)
 OBJECT_NAME                            VARCHAR2(128)
 SUBOBJECT_NAME                         VARCHAR2(30)
 OBJECT_ID                            NUMBER
 DATA_OBJECT_ID                         NUMBER
 OBJECT_TYPE                            VARCHAR2(19)
 CREATED                            DATE
 LAST_DDL_TIME                            DATE
 TIMESTAMP                            VARCHAR2(19)
 STATUS                             VARCHAR2(7)
 TEMPORARY                            VARCHAR2(1)
 GENERATED                            VARCHAR2(1)
 SECONDARY                            VARCHAR2(1)
 NAMESPACE                            NUMBER
 EDITION_NAME                            VARCHAR2(30)
 COUNTRY                            VARCHAR2(20)

SCOTT@PROD4 >create directory expdp as ‘/home/oracle/expdp‘;

Directory created.

SCOTT@PROD4 >grant all on directory expdp to public;

Grant succeeded.

[oracle@edbjr2p2 ~]$ mkdir -p /home/oracle/expdp
[oracle@edbjr2p2 ~]$ chmod 777 -R /home/oracle/expdp/

[oracle@edbjr2p2 trace]$ expdp scott/tiger flashback_scn=3072010 tables=t dumpfile=t.dmp logfile=t.log directory=expdp

Export: Release 11.2.0.3.0 - Production on Sun Feb 16 00:19:54 2020

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 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** flashback_scn=3072010 tables=t dumpfile=t.dmp logfile=t.log directory=expdp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 9 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-31693: Table data object "SCOTT"."T" failed to load/unload and is being skipped due to error:
ORA-02354: error in exporting/importing data
ORA-01466: unable to read data - table definition has changed
Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
  /home/oracle/expdp/t.dmp
Job "SCOTT"."SYS_EXPORT_TABLE_01" completed with 1 error(s) at 00:20:06

 

数据泵导出报错ORA-31693 ORA-02354 ORA-01466

标签:cto   oracl   create   base   reserve   created   eth   flashback   starting   

原文地址:https://www.cnblogs.com/gw666/p/12316188.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!