zoukankan      html  css  js  c++  java
  • rebuild online时意外中断 再次重建时报错解决方法

    rebuild online时意外中断

    再次重建时报错

    SQL> alter index PARTY.IDX_CM_INDIV_CUSTOMER_4 rebuild online;

    alter index PARTY.IDX_CM_INDIV_CUSTOMER_4 rebuild online

    *

    ERROR at line 1:

    ORA-08104: this index object 11652698 is being online built or rebuilt

    DECLARE

    isClean BOOLEAN;

    BEGIN

    isClean := DBMS_REPAIR.ONLINE_INDEX_CLEAN(11652698);

    END;

    /


    下面是MOSC上的解释

    SMON will eventually cleanup the locked index so no actions are actually needed. However, letting SMON do the cleanup can be a bit of 'hit and miss' as SMON will try to cleanup every 60 minutes

    and if it cannot get a lock on the object with NOWAIT it will just try again later. In a highly active database with many transactions this can cause the rebuild to take a long time as SMON won't get

    the lock with NOWAIT. Other cases like uncommitted transactions

    against the table will also result in SMON not rebuilding the index.

    As long as the index is not rebuild all access to the index will result in ORA-8104 or ORA-8106.           So to solve this situation a manual cleanup can be done using the new function

    DBMS_REPAIR.ONLINE_INDEX_CLEAN()

    SQL> conn / as sysdba

    SQL> DECLARE

    isClean BOOLEAN;

    BEGIN

    isClean := DBMS_REPAIR.ONLINE_INDEX_CLEAN();

    END;

    /

    The function is fully documented in the manual: PL/SQL Packages and Types Reference, 10.2

  • 相关阅读:
    二维数组和最大字数组求取 2
    spring冲刺第七天
    spring冲刺第六天
    寻找水王
    spring冲刺第五天
    spring冲刺第四天
    spring冲刺第三天
    spring冲刺第二天
    大道至简读书笔记3
    spring冲刺第一天
  • 原文地址:https://www.cnblogs.com/kawashibara/p/10473718.html
Copyright © 2011-2022 走看看