Wednesday 6 September 2017

ORA-20002: Version of statistics table "APPLSYS"."FND_STATTAB" is too old. Please try upgrading it with dbms_stats.upgrade_stat_table ORA-06512: at "APPS.FND_STATS", line 2828 ORA-06512: at line 1


This issue could come when you upgrade your DB to 12c or higher version.

To Replicate the issue gather stats on a table, Upgrade DB to 12c, create new index on the table and try to gather stats using below piece of code.

Gather Stats :-

exec fnd_stats.GATHER_TABLE_STATS(ownname=>'XXNAME',tabname=>'XX_NAME_TBL', PERCENT=>20,degree=>32,backup_FLAG=>'BACKUP',cascade=>true,invalidate=>'Y');

OR

BEGIN fnd_stats.GATHER_TABLE_STATS(ownname=>'XXNAME',tabname=>'XX_NAME_TBL', PERCENT=>20,degree=>32,backup_FLAG=>'BACKUP',cascade=>true,invalidate=>'Y'); END;


Error :-

ORA-20002: Version of statistics table "APPLSYS"."FND_STATTAB" is too old.
Please try upgrading it with dbms_stats.upgrade_stat_table
ORA-06512: at "APPS.FND_STATS", line 2828
ORA-06512: at line 1


Solution :-

1. Connect to sqlplus / as sysdba
2. Backup FND_STATTAB table
3. run: EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE(‘APPLSYS’,’FND_STATTAB’);

Now try to gather stats on your table.

No comments:

Post a Comment