ORA-38029 : object statistics are locked Recently
November 5, 2009 by Nauman · Leave a Comment
This error comes when analyzing tables in oracle. Basic issue in this error is when you import table without data i.e structure/schema only, oracle will lock table statistics.
You can view all the locked tables in schema by executing following query:
select table_name, stattype_locked
from dba_tab_statistics
where owner = ‘MBS’ and stattype_locked is not null;
Then how to unlock them, following query will help us to sort this issue:
select ‘exec DBMS_STATS.UNLOCK_TABLE_STATS (”’|| owner ||”’,”’|| table_name ||”’);’ from dba_tab_statistics where owner = ‘MBS’ and stattype_locked is not null;
or you can do that for every single table:
exec DBMS_STATS.UNLOCK_TABLE_STATS(‘owner’,'table name’);