IMP ORA-20005: object statistics are locked(一)


    在10.2.0.1版本的数据库服务器中,dbms_stats.gather_table_stats遇到问题:
    ORA-20005: object statistics are locked (stattype = ALL)

SQL> exec dbms_stats.gather_table_stats(ownname => 'ECC_VIEW',tabname => 'TABLE_TEST1',cascade => TRUE,estimate_percent => 20);
 
begin dbms_stats.gather_table_stats(ownname => 'ECC_VIEW',tabname => 'TABLE_TEST1',cascade => TRUE,estimate_percent => 20); end;
 
ORA-20005: object statistics are locked (stattype = ALL)
ORA-06512: at "SYS.DBMS_STATS", line 13056
ORA-06512: at "SYS.DBMS_STATS", line 13076
ORA-06512: at line 2

Symptoms
---------
While collecting statistics on queue tables, getting error ORA-20005

BEGIN
DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'SASTHAS',TABNAME => 'SRSR_QT',CASCADE => TRUE, ESTIMATE_PERCENT => 15);
END;
*
ERROR at line 1:
ORA-20005: object statistics are locked (stattype = ALL)
ORA-06512: at "SYS.DBMS_STATS", line 13182
ORA-06512: at "SYS.DBMS_STATS", line 13202
ORA-06512: at line 1

Cause
--------
This is a feature implemented in 10.2 through the fix for the unpublished bug 4244637

Solution
--------
It is not recommended to collect statistics on volatile tables like queue tables.
The fix for the bug is to lock the statistics collection on queue tables.

To avoid the ORA-20005:
- Unlock the table statistics after the import:
   execute DBMS_STATS.UNLOCK_TABLE_STATS('','

Do not import the table statistics (EXCLUDE=TABLE_STATISTICS impdp parameter)


SQL> exec dbms_stats.unlock_table_stats(ownname => 'ECC_VIEW',tabname => 'TABLE_TEST1'); 
PL/SQL procedure successfully completed 
or
SQL> EXEC DBMS_STATS.unlock_schema_stats(ownname => 'ECC_VIEW');
PL/SQL procedure successfully completed

SQL> exec dbms_stats.gather_table_stats(ownname => 'ECC_VIEW',tabname => 'TABLE_TEST1',cascade => TRUE,estimate_percent => 20); 
PL/SQL procedure successfully completed

此处为临时解决方案,真正原因见:
IMP ORA-20005: object statistics are locked(二)

参考文献:
 Subject:  ORA-20005 on Queue Table Statistics Collection
  Doc ID:  558187.1 Type:  PROBLEM
  Modified Date :  17-MAR-2008 Status:  MODERATED

Subject:  DataPump Import Without Data Locks Table Statistics
  Doc ID:  415081.1 Type:  PROBLEM
  Modified Date :  27-APR-2007 Status:  MODERATED

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9252210/viewspace-607297/,如需转载,请注明出处,否则将追究法律责任。

user_pic_default.png
请登录后发表评论 登录
全部评论
<%=items[i].createtime%>

<%=items[i].content%>

<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%=items[i].items.items[j].createtime%> 回复

<%=items[i].items.items[j].username%>   回复   <%=items[i].items.items[j].tousername%><%=items[i].items.items[j].content%>

<%}%> <%if(items[i].items.total > 5) { %>
还有<%=items[i].items.total-5%>条评论 ) data-count=1 data-flag=true>点击查看
<%}%>
<%}%> <%}%>

转载于:http://blog.itpub.net/9252210/viewspace-607297/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值