首页 > 代码库 > Ora - 20005
Ora - 20005
SQL> begin 2 3 dbms_stats.gather_table_stats(ownname => ‘GZ_SAFETY‘,tabname=>‘MB_BSS_USER_LOCATION‘, partname =>‘PART_20170621‘); 4 end; 5 / begin dbms_stats.gather_table_stats(ownname => ‘GZ_SAFETY‘,tabname=>‘MB_BSS_USER_LOCATION‘, partname =>‘PART_20170621‘); end; ORA-20005: objectstatistics are locked (stattype = ALL) ORA-06512: at "SYS.DBMS_STATS",line 24281 ORA-06512: at "SYS.DBMS_STATS",line 24332 ORA-06512: at line 3 查看统计信息锁定情况: select distincttable_name, stattype_locked from user_tab_statistics where table_name =‘MB_BSS_USER_LOCATION‘; SQL> execdbms_stats.gather_table_stats(ownname => ‘GZ_SAFETY‘,tabname=>‘MB_BSS_USER_LOCATION‘, force=>TRUE); /*强制收集*/ PL/SQL procedure successfully completed SQL> SQL> SQL> exec dbms_stats.unlock_table_stats(ownname=> ‘GZ_SAFETY‘, tabname=>‘MB_BSS_USER_LOCATION‘); /*解锁*/ PL/SQL procedure successfully completed 补充:解锁schema。 DBMS_STATS.UNLOCK_schema_STATS(user);
Ora - 20005
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。