ORA-20002: Version Of Statistics Table SCOTT.STATS Is Too Old

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 21 Dec, 2023
  • 0 Comments
  • 1 Min Read

ORA-20002: Version Of Statistics Table SCOTT.STATS Is Too Old

Solution :

If we are importing stats table from higher version to lower version, then before importing in the database, we need to upgrade the stats table. UPGRADE STATS TABLE:
SQL> EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('ABC','STAT_TEST');

PL/SQL procedure successfully completed.
Now do the import:
exec dbms_stats.import_table_stats(ownname=>'ABC', tabname=>'TEST', stattab=>'STAT_TEST', cascade=>true);

PL/SQL procedure successfully completed.