Migrated DB from 12c to 19c with IMPDP failed I have migrated a DB from 12c to 19c with IMPDP and EXPDP. While importing I have seen some errors. Below is an extract of the errors.

Errors During Import


Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Processing object type SCHEMA_EXPORT/STATISTICS/MARKER

VM247_RCDB_121GA.PK_TXI : sqlerrm = ORA-20000: Unable to set values for index PK
_TXI: does not exist or insufficient privileges

VM247_RCDB_121GA.PK_ARRE : sqlerrm = ORA-20000: Unable to set values for index P
K_ARRE: does not exist or insufficient privileges

VM247_RCDB_121GA.PK_ARA : sqlerrm = ORA-20000: Unable to set values for index PK
_ARA: does not exist or insufficient privileges

VM247_RCDB_121GA.SYS_C0034921 : sqlerrm = ORA-20000: Unable to set values for in
dex SYS_C0034921: does not exist or insufficient privileges

VM247_RCDB_121GA.PK_TXA : sqlerrm = ORA-20000: Unable to set values for index PK
_TXA: does not exist or insufficient privileges

Importing statistics failed for 20 object(s);

Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 22 error(s) at Wed Aug 7 08:2
8:32 2019 elapsed 0 00:05:25



The utilities are: expdp from 12c and impdp from 19c

Commands Issued

On the 12c instance i exported using: 

expdp system/admin@orcl schemas=VM247_RCDB_121GA directory=DATA_PUMP_DIR  
dumpfile=VM247_RCDB_121V10.dmp logfile=VM247_RCDB_121V10.log


...and imported on the 19c instance with:

impdp system/admin@orcl19c schemas=VM247_RCDB_121GA directory=DATA_PUMP_DIR 
dumpfile=VM247_RCDB_121V10.DMP logfile=VM247_RCDB_121V10_imp.log
This is a known problem (bug 26380126). The workaround is to exclude statistics, and the re-gather in the target database. Or export using DBMS_STATS. 

Actually, Oracle recommends that you never export the statistics with datapump. Use one of the above two mentioned methods instead.