Home > ISSUES > ORA-20002: Version of statistics table SYSTEM.TABLE_STATS_TBL is too old.

ORA-20002: Version of statistics table SYSTEM.TABLE_STATS_TBL is too old.

November 7, 2013

Recently i was working upgrade  and i got below error while transferring stats from 10g to 11g. i got the below error.

SQL> exec DBMS_STATS.IMPORT_TABLE_STATS(ownname=>’S2BCCSQ’,tabname => ‘TB_MAILBOX_INBOUND’,stattab => ‘table_stats_tbl’,statid => ‘Table_Stats_before_upgrade’,cascade => TRUE,statown => ‘system’);

BEGIN DBMS_STATS.IMPORT_TABLE_STATS(ownname=>’S2BCCSQ’,tabname => ‘TB_MAILBOX_INBOUND’,stattab => ‘table_stats_tbl’,statid => ‘Table_Stats_before_upgrade’,cascade => TRUE,statown => ‘system’); END;

*

ERROR at line 1:

ORA-20002: Version of statistics table SYSTEM.TABLE_STATS_TBL is too old.
Please try upgrading it with dbms_stats.upgrade_stat_table
ORA-06512: at “SYS.DBMS_STATS”, line 11211
ORA-06512: at “SYS.DBMS_STATS”, line 12604
ORA-06512: at line 1

Solution taken:-

SQL> exec DBMS_STATS.UPGRADE_STAT_TABLE(‘SYSTEM’,’table_stats_tbl’);

PL/SQL procedure successfully completed.

SQL> exec DBMS_STATS.IMPORT_TABLE_STATS(ownname=>’S2BCCSQ’,tabname => ‘TB_MAILBOX_INBOUND’,stattab => ‘table_stats_tbl’,statid => ‘Table_Stats_before_upgrade’,cascade => TRUE,statown => ‘system’);

PL/SQL procedure successfully completed.

SQL>

Advertisements
Categories: ISSUES
%d bloggers like this: