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

Posted datalife

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据泵导出报ORA-01555 ORA-22924相关的知识,希望对你有一定的参考价值。

今天对某数据库执行数据泵导出操作时碰到如下错误:
Processing object type DATABASE_EXPORT/SCHEMA/JOB
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCACT_INSTANCE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCDEPOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/AUDIT
. . exported "ZXUSER"."T_MX_ATTACHMENT" 9.452 GB 9549 rows
ORA-31693: Table data object "SGBIZ"."T_MX_ATTACHMENT" 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 with name "" too small
ORA-22924: snapshot too old
Master table "SYS"."SYS_EXPORT_FULL_01" successfully loaded/unloaded

首先修改undo_retention=10800重新导出问题依旧。
alter system set undo_retention=10800 sid=‘*‘;
$ oerr ora 22924
22924, 00000, "snapshot too old"
// *Cause: The version of the LOB value needed for the consistent read was
// already overwritten by another writer.
// *Action: Use a larger version pool.

--才明白这个跟lob字段有关。

select column_name, pctversion, retention from dba_lobs where table_name = ‘T_MX_ATTACHMENT‘;
col COLUMN_NAME for a30
select column_name, pctversion, retention from dba_lobs where table_name = ‘T_MX_ATTACHMENT‘;

COLUMN_NAME PCTVERSION RETENTION
------------------------------ ---------- ----------
ATT_FILE 900

--这个表本身不大,但是lob字段占用的空间很大,可以发现即使改动了参数undo_retention=10800,表lob的属性
--RETENTION依旧900,必须增加该参数,或者使用PCTVERSION参数。

alter table SGBIZ.T_MX_ATTACHMENT modify lob(ATT_FILE)(retention);
alter table SGBIZ.T_MX_ATTACHMENT modify lob(ATT_FILE)(PCTVERSION 20);

select column_name, pctversion, retention from dba_lobs where table_name = ‘T_MX_ATTACHMENT‘;
COLUMN_NAME PCTVERSION RETENTION
-------------------- ---------- ----------
REPORTPRINT 10800

修改后重新导出,导出正常。
Processing object type DATABASE_EXPORT/SCHEMA/JOB
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCACT_INSTANCE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCDEPOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/AUDIT
. . exported "ZXUSER"."T_MX_ATTACHMENT" 9.452 GB 9549 rows
. . exported "SGBIZ"."T_MX_ATTACHMENT" 21.30 GB 35716 rows
Master table "SYS"."SYS_EXPORT_FULL_02" successfully loaded/unloaded

以上是关于数据泵导出报ORA-01555 ORA-22924的主要内容,如果未能解决你的问题,请参考以下文章

用expdp导出报错求教ORA-39126,ORA-01555

[SQL]Oracle ORA-01555快照过旧的错误

oracle 11g rac ORA-01555 快照过旧报错处理

ORA-01555 异常处理

Oracle数据库 ORA

Oracle数据库 ORA