zoukankan      html  css  js  c++  java
  • 数据泵导出报错ORA-31693 ORA-02354 ORA-01466

    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

  • 相关阅读:
    x01.JavaHello
    x01.Weiqi.1 提子算法
    x01.Weiqi.3 网络对弈
    Cryptography
    Javascript判断中文字节
    asp.net mvc,asp.net4.0空间出售
    Sql Server中判断日志是否为一个星期
    DIV+CSS实现二级导航菜单
    ExecutorService线程池 [转]
    Android程序开发所用app图标的几种大小
  • 原文地址:https://www.cnblogs.com/gw666/p/12316188.html
Copyright © 2011-2022 走看看