Data Pump Export 数据泵导出因ORA-31693 ORA-02354 和 ORA-01555 错误且没有LOB损坏而失败 (Doc ID 1507116.1)

Data Pump Export Fails With ORA-31693 ORA-02354 and ORA-01555 Errors And No LOB Corruption (Doc ID 1507116.1)

APPLIES TO:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

You are exporting your applications database using Data Pump (expdp), and all is exporting fine, except one table fails to export with the following errors:

您正在使用数据泵(expdp)导出应用程序数据库,并且一切正常,但一个表无法导出却出现以下错误:

ORA-31693: Table data object "<SCHEMA_NAME>"."<TABLE_NAME>" 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 154 with name "<ROLLBACK_SEGMENT_NAME>" too small

You suspected that you may have had LOB corruption and followed the steps from Note:452341.1 or Note:787004.1, but no corruption is found in the LOB.

您怀疑您可能已发生LOB损坏,并遵循了Note:452341.1Note:787004.1中的步骤,但是在LOB中未发现损坏

CHANGES

CAUSE

The LOB Retention is not defined properly.  LOB保留的定义不正确

This is confirmed by the queries:  通过查询确认

SQL> show parameter undo;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1

SQL> select max(maxquerylen) from v$undostat;

MAX(MAXQUERYLEN)
----------------
16331

SQL> select retention from dba_lobs where owner=‘<SCHEMA_NAME>‘ and table_name=‘<TABLE_NAME>‘;

RETENTION
----------
900

We see the retention comes back showing 900 seconds (15 minutes) which is the same as the current UNDO_RETENTION, but the maxquery length is 16331 seconds.

我们看到保留时间返回,显示为900秒(15分钟),与当前的UNDO_RETENTION相同,但是maxquery的长度为16331秒

When the LOB was created, the actual setting for RETENTION was defined by the current setting for UNDO_RETENTION.

创建LOB时,RETENTION的实际设置由UNDO_RETENTION的当前设置定义

This time is not long enough.  这个时间还不够长。

SOLUTION

1. Modify the current UNDO_RETENTION for the database:

1. 修改数据库的当前UNDO_RETENTION

SQL>ALTER SYSTEM SET UNDO_RETENTION = 16500 scope=both sid=‘*‘;

Note: For versions =< 10.2.0.5, an instance restart is required because LOB retention does not change when undo_retention is changed. See further details from Document 563470.1 which shows that retention is not changed until after a restart.

注意:对于版本= <10.2.0.5,需要重新启动实例,因为更改undo_retention时LOB保留不会更改。请参阅文档563470.1中的更多详细信息,该文档显示保留直到重新启动后才更改。

2. Modify the LOB retention to become greater than the undersized retention parameter following the steps from Note:563470.1

2. 按照注:563470.1中的步骤,修改LOB保留,使其大于大小不足的保留参数。

SQL> alter table <SCHEMA_NAME>.<TABLE_NAME> modify lob(<LOB_COLUMN_NAME>) (pctversion 5);
Table altered.

SQL> alter table <SCHEMA_NAME>.<TABLE_NAME> modify lob(<LOB_COLUMN_NAME>) (retention);
Table altered.

3.  Query the lob retention again to verify that the change has taken hold:

3.再次查询lob保留,以确认更改已生效:

SQL> select retention from dba_lobs where owner=‘<SCHEMA_NAME>‘ and table_name=‘<TABLE_NAME>‘;

RETENTION
----------
16500

4. Perform the export again.  再次执行导出。

REFERENCES

NOTE:787004.1 - Export Receives The Errors ORA-1555 ORA-22924 ORA-1578 ORA-22922
NOTE:563470.1 - Lob retention not changing when undo_retention is changed
NOTE:452341.1 - ORA-01555 And Other Errors while Exporting Table With LOBs, How To Detect Lob Corruption.

原文地址:https://www.cnblogs.com/zylong-sys/p/11965239.html

时间: 2024-10-10 22:30:59

Data Pump Export 数据泵导出因ORA-31693 ORA-02354 和 ORA-01555 错误且没有LOB损坏而失败 (Doc ID 1507116.1)的相关文章

数据泵导出/导入Expdp/impdp

Oracle 10g引入了DATA PUMP提供的是一种基于服务器的数据提取和恢复的实用程序,DATA PUMP在体系结构和功能上与传统的EXPORT和IMPORT实用程序相比有了显著的提升.DATA PUMP允许您停止和重启作业,查看运行的作业的状态,及对导入和导出的数据做限制. 注意:数据泵文件与传统的EXP/IMP数据转储文件是不兼容的. 一.以下是DATA PUMP的几个优点介绍: 1.数据泵(DataPump)的所有工作都有数据库实例来完成,数据库可以并行来处理这些工作,不仅可以通过建

使用Unified Auditing Policy审计数据泵导出操作

1.创建审计策略 SQL> alter session set container=pdb1; SQL> create or replace directory dumpdir as '/u12/app/dumpdir'; SQL> grant read,write on directory dumpdir to scott; SQL> create audit policy dp_01 actions component=datapump export; 2.开启审计策略 SQL

数据泵导出报ORA-01555 ORA-22924

今天对某数据库执行数据泵导出操作时碰到如下错误:Processing object type DATABASE_EXPORT/SCHEMA/JOBProcessing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCACT_INSTANCEProcessing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCDEPOBJProcessing object t

LOB对象在数据泵导出、导入后查询对象数量发现丢失

问题描述:问题:源库的某个Schema使用数据泵Expdp元数据整体导出,在目标库导入且成功后,逻辑验证用户对象,发现缺失.分析查询后,缺失的对象,都是LOB类型(并不是所有的LOB都无法导入,是大部分LOB类型的对象) #以下逻辑验证,SQL执行,对比源库.目标库数据#以下语句特点:测试环境,还原状况模拟:数据无法完全重现 SQL> select OBJECT_TYPE,count(*) from dba_objects where owner='SCOTT' group by object_

03.01 Oracle数据泵导出导出(expdp/impdp)命令举例(上)

Oracle数据泵导出导出(expdp/impdp)命令举例(上) ##实验目的: 使用数据泵迁移数据 ##实验环境: Oracle 11.2.0.4,利用数据库自带的scott示例用户进行试验测试 实验步骤概述: 1.首先需要创建Directory 2.使用expdp导出用户数据 2.1 只导出scott用户的元数据,且不包含统计信息: 2.2 只导出scott用户的数据: 2.3 只导出scott用户下的emp,dept表及数据: 2.4 只导出scott用户下的emp,dept表结构: 2

数据泵导出出现ORA-31617错误

Export: Release 11.2.0.4.0 - Production on Sat Jun 11 01:00:02 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the

dbca静默管理数据库&amp;数据泵导出导入

#dbca参考链接:https://blog.51cto.com/hunt1574/1933535https://www.linuxidc.com/Linux/2017-03/141830.htmhttps://www.cnblogs.com/dbabd/p/10250968.html#autoid-3-1-0http://blog.itpub.net/29047826/viewspace-1431667/总结:快速删库或建库:||||||||||||||||||||||||||||||||||

编写PL/SQL程序使用数据泵导出导入数据

1.什么是数据泵?就是oracle的一个PL/SQL程序包 dbms_datapump2.数据泵技术是Oracle Database 10g 中的新技术,它比原来导入/导出(imp,exp)技术快15-45倍.速度的提高源于使用了并行技术来读写导出转储文件. expdp使用 使用EXPDP工具时,其转储文件只能被存放在DIRECTORY对象对应的OS目录中,而不能直接指定转储文件所在的OS目录.因此使用EXPDP工具时,,必须首先建立DIRECTORY对象,并且需要为数据库用户授予使用DIREC

数据泵导出/导入数据

由于在oracle11g之后的某些版本中,采用exp方式导出数据会导致空表被漏掉,解决办法分为两种: 一.对空表进行插入操作,然后再删除数据. 二.采用数据泵的方式导出. 本文介绍第二种方式. 导出: 1.从cmd中以dba权限登录数据库:sqlplus system/密码@orcl as sysdba; 2.创建目录: Create directory TEST as 'd:\test'; 3.授权:Grant read,write on directory TEST to yxf; 4.对应