My Oracle Support Banner

ORA-20002 on Importing Statistics using DBMS_STATS Procedures (Doc ID 740345.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 10.2 to 11.2]
Information in this document applies to any platform.


When the database versions for exporting and importing statistics are not the same, an ORA-20002 may be returned depending on versions used for the export and import.
The text of the error message will be different depending on whether the import is done into a higher or lower version.

Importing from Lower Version of Oracle into Higher Version

The following error message is displayed:

ORA-20002: Version of statistics table SCOTT.STATS is too old.  Please try upgrading it with dbms_stats.upgrade_stat_table
ORA-06512: at "SYS.DBMS_STATS", line 11476
ORA-06512: at "SYS.DBMS_STATS", line 11493
ORA-06512: at "SYS.DBMS_STATS", line 12628
ORA-06512: at line 1

Importing from Higher Version of Oracle into Lower Version

The following error message is displayed:

ORA-20002: Unknown error when using statistics table SCOTT.STATS.  Please drop and recreate with dbms_stats.drop_stat_table and
ORA-06512: at "SYS.DBMS_STATS", line 8478
ORA-06512: at "SYS.DBMS_STATS", line 8493
ORA-06512: at "SYS.DBMS_STATS", line 9294
ORA-06512: at line 1



To view full details, sign in with your My Oracle Support account.

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

In this Document
 Importing Statistics from Lower to Higher Version
 Importing Statistics from Higher to Lower Version

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.