Monday, May 16, 2011
Gather Schema Stats Fail With: Unable to correctly update the history table - fnd_stats_hist. -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated.
Hi All.
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 4 internal_flag= NOBACKUP Unable to correctly update the history table - fnd_stats_hist. -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
Solution:
1. Take a backup of the FND_STATS_HIST table
2. Truncate table FND_STATS_HIST: truncate table APPLSYS.FND_STATS_HIST;
3. Re-submit Gather Schema Statistics program.
Also can be the following error:
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 4 internal_flag= NOBACKUP Error #1: ERROR: While GATHER_TABLE_STATS: object_name=< schema. object_name >***ORA-20005: object statistics are locked (stattype = ALL)***
Solution:
1.Run
select owner, table_name, stattype_locked from dba_tab_statistics where stattype_locked is not null;
2. For unlock the schema
EXEC DBMS_STATS.UNLOCK_SCHEMA_STATS('<schema name >');
3. Run again to check that the schema was unlocked.
select owner, table_name, stattype_locked from dba_tab_statistics where stattype_locked is not null;
4. Re-submit Gather Schema Statistics program
Good luck..
Subscribe to:
Post Comments (Atom)
excellent article and it really helped me during my R12 upgrade.. thanks a lot
ReplyDelete