Thursday, September 29, 2011

Issue : Statistics locked when running GSS

Issue: statistics locked error when running GSS

Gathering statistics using concurrent jobs "Gather Schema Statistics / Gather Table Statistics" or running FND_STATS fails with "ORA-20005: object statistics are locked".

First identify the object
select owner, table_name, stattype_locked
from dba_tab_statistics
where stattype_locked is not null;

and then unlock the stats

nlock statistics gathering on those queues running:

exec dbms_stats.unlock_schema_stats('schema_owner');
exec dbms_stats.unlock_table_stats('table_owner','table_name');


Example:

SQL> exec dbms_stats.unlock_schema_stats ('AR');
SQL> exec dbms_stats.unlock_table_stats('AR', 'AR_REV_REC_QT');

No comments:

Post a Comment