问题:ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"OGGTEST"."TEST1" creation failed
1、检查是否有主键或者唯一键
SQL> desc test1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(20)
2、删除主键约束
SQL> ALTER TABLE TEST1 DROP PRIMARY KEY ;
Table altered.
或者(
SQL> alter table test1 modify id int;
Table altered.
)
3、确认是否更改完成
SQL> desc test1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)
NAME VARCHAR2(10)
4、重新导入
[oracle@test backup]$ impdp odc/odc schemas=oggtest directory=DUMP_FILE dumpfile=test2_1.dmp logfile=test2_1.log TABLE_EXISTS_ACTION = replace
Import: Release 11.2.0.4.0 - Production on Sun Jan 9 14:16:36 2022
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 Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "ODC"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "ODC"."SYS_IMPORT_SCHEMA_01": odc/******** schemas=oggtest directory=DUMP_FILE dumpfile=test2_1.dmp logfile=test2_1.log table_exists_action=replace
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"OGGTEST" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "OGGTEST"."TEST" 5.460 KB 5 rows
. . imported "OGGTEST"."TEST1" 5.445 KB 3 rows
. . imported "OGGTEST"."TEST2" 5.437 KB 2 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "ODC"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at Sun Jan 9 14:16:42 2022 elapsed 0 00:00:05