1

我正在尝试在重新映射模式和表空间时导入 oracle 转储:

impdp usr/pass \
    EXCLUDE=table_statistics \
    DIRECTORY=EXPDP \
    REMAP_SCHEMA=ORG_USR:NEW_USR \
    REMAP_TABLESPACE=ORG_TS:NEW_TS \
    DUMPFILE=FILE.dmp \
    PARALLEL=2 \
    LOGFILE=FILE.imp.log

该作业导入所有表,然后开始处理对象类型:

Import: Release 12.1.0.2.0 - Production on Thu Aug 17 11:13:06 2017

[ ... the import remaps correct ]

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "NEW_USR"."SOMETABLE"              112.4 MB 1402414 rows
. . imported "NEW_USR"."SOMEOTHERTABLE"                 235.9 MB  955249 rows
. . imported "NEW_USR"."SOMETABLE3"                 86.91 MB  440513 rows

[... everything works until ...]

Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
 SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEA');
 END;
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
 SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEB');
 END;
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
 SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEC');
 END;
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 3 error(s) at Thu Aug 17 11:19:02 2017 elapsed 0 00:05:56

我确实指定了REMAP_SCHEMAand REMAP_TABLESPACE,并且导入运行基本正确。

但在最后部分尝试Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION使用旧用户以某种方式失败。

有人可以告诉我出了什么问题以及如何解决吗?

4

1 回答 1

2

post_table_action解决方案是在将模式名更改为正确值后手动导入排除和执行语句:

impdp usr/pass \
    EXCLUDE=post_table_action \
    DIRECTORY=EXPDP \
    REMAP_SCHEMA=ORG_USR:NEW_USR \
    REMAP_TABLESPACE=ORG_TS:NEW_TS \
    DUMPFILE=FILE.dmp \
    PARALLEL=2 \
    LOGFILE=FILE.imp.log

BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEA');
END;
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEB');
END;
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEC');
END;
于 2017-08-17T12:15:47.600 回答