收集统计信息报错:
ERROR at line 1: ORA-20005: object statistics are locked (stattype = ALL) ORA-06512: at "SYS.DBMS_STATS", line 24281 ORA-06512: at "SYS.DBMS_STATS", line 24332 ORA-06512: at line 1
查看
select owner,table_name,last_analyzed,stattype_locked,stale_stats from dba_tab_statistics t where owner ='' and table_name='';
--last_analyzed 最后一次分析表的时间
--stattype_locked ALL表示统计信息被锁定
--stale_stats 统计信息是否过期
解锁
exec dbms_stats.unlock_table_stats('owner','table_name');