hr@(20_CBTDEPDB)> select owner,table_name,STATTYPE_LOCKED from dba_tab_statistics where owner='HR'; OWNER TABLE_NAME STATTYPE_LOCKED -------------------- -------------------- -------------------- HR REGIONS ALL HR COUNTRIES ALL HR LOCATIONS ALL HR DEPARTMENTS ALL HR JOBS ALL HR EMPLOYEES ALL HR JOB_HISTORY ALL HR REGIONS_COL ALL HR TBSPAR_ORDER ALL HR REGIONS2 ALL HR REGIONS ALL HR TAB1 ALL HR TDE1 ALL HR TBSPAR_ORDER ALL 14 rows selected. hr@(20_CBTDEPDB)>
hr@(20_CBTDEPDB)> execute dbms_stats.gather_table_stats(ownname=>'HR',tabname=>'REGIONS'); BEGIN dbms_stats.gather_table_stats(ownname=>'HR',tabname=>'REGIONS'); END; * ERROR at line 1: ORA-20005: object statistics are locked (stattype = ALL) ORA-06512: at "SYS.DBMS_STATS", line 34634 ORA-06512: at line 1 hr@(20_CBTDEPDB)>