Errors When Importing Table With IGNORE=Y IMP-58 ORA-904 IMP-17 (DBMS_STATS) IMP-3 ORA-20000 ORA-6512 (Doc ID 282262.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.7.0 to 10.2.0.5 [Release 8.1.7 to 10.2]
Oracle Database - Personal Edition - Version 8.1.7.0 to 10.2.0.5 [Release 8.1.7 to 10.2]
Oracle Database - Standard Edition - Version 8.1.7.0 to 10.2.0.5 [Release 8.1.7 to 10.2]
Information in this document applies to any platform.
***Checked for relevance on 10-Apr-2013***

Symptoms

You run an import (FULL=Y or FROMUSER/TOUSER or TABLES) and you have specified the import parameter IGNORE=Y. The import of a table fails with the following errors:

...
. . importing table "TESTTAB"
IMP-00058: ORACLE error 904 encountered
ORA-00904: "COL2": invalid identifier
IMP-00017: following statement failed with ORACLE error 20000:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := 'C102'; SREC.MAXVAL "
":= 'C102'; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.N"
"UMARRAY(1,1); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_"
"STATS.SET_COLUMN_STATS(NULL,'"TESTTAB"','"COL2"', NULL ,NULL,NULL,1,1,0,sre"
"c,2,0); END;"
IMP-00003: ORACLE error 20000 encountered
ORA-20000: Unable to set values for column COL2: does not exist or insufficient
privileges
ORA-06512: at "SYS.DBMS_STATS", line 3390
ORA-06512: at "SYS.DBMS_STATS", line 3548
ORA-06512: at line 1
Import terminated successfully with warnings.


Note that the table name, the details in PL/SQL procedure of DBMS_STATS.STATREC, and the line numbers of the DBMS_STATS package that are reported in the ORA-6512 errors, can be different.

Changes

You recently modified the table in the target database and dropped or modified columns.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms