zoukankan      html  css  js  c++  java
  • Bug 9881143 : UTL_RECOMP.RECOMP_SERIAL RESULTS IN ORA-00955

    Hdr: 9881143 10.2.0.5.0 PLSQL 10.2.0.5.0 PACKAGES PRODID-11 PORTID-46
    Abstract: UTL_RECOMP.RECOMP_SERIAL RESULTS IN ORA-955

    *** 07/06/10 10:41 am ***
    Problem description:
    ---------------------
    When trying to re-execute UTL_RECOMP.RECOMP_SERIAL after the session was
    terminated resulted in the error while trying to create an index:

    ORA-955: name is already used by an existing object

    According to the customer the sqlplus session that was executing the
    UTL_RECOMP.RECOMP_SERIAL may have been terminated by sqlplus that is
    executing the call is closed, connection to Oracle Database is lost, Database
    shutdown, etc.

    They unwrapped the UTL_RECOMP package and identified the following as where
    they feel the code was in error:

    When UTL_RECOMP was abort its possible that a following index was be created,
    but not dropped, because UTL_RECOMP dont finish with success.

    246       EXEC_FORCE(
    247        'CREATE INDEX utl_recomp_comp_idx1 ON utl_recomp_compiled(obj#)'
    ||
    248           CASE
    249            WHEN THREADS > 1 THEN
    250              ' PARALLEL ' || THREADS
    251            ELSE
    252              ' NOPARALLEL'
    253           END
    254          );
    ....
    296       EXEC_FORCE('DROP INDEX utl_recomp_comp_idx1');

    If this occur (its difficult create a test case), in next execution
    UTL_RECOMP will do a error ORA-955, because index utl_recomp_comp_idx1
    already exists and EXEC_FORCE don't have a EXCEPTION for this ORA-955:

      20    PROCEDURE EXEC_FORCE(COMMAND VARCHAR2) IS
      21    BEGIN
      22       EXECUTE IMMEDIATE COMMAND;
      23    EXCEPTION
      24       WHEN INDEX_NOT_EXIST OR
      25            SEQUENCE_NOT_EXIST THEN
      26          NULL;
      27    END;

    They are unable to reproduce this error on demand.

    Keywords:
    --------
    UTL_RECOMP

    Available workarounds:
    ---------------------
    Drop the index that the Ora-955 is erroring on and then re-run UTL_RECOMP.

    Related bugs:
    ------------
    Did you search for duplicate bugs?
    Yes, none were found.

    Additional information:
    -----------------------

    *** 07/07/10 05:48 am ***
    *** 07/07/10 05:48 am ***
    *** 07/07/10 06:18 am ***
    *** 07/07/10 06:18 am *** (CHG: Sta->35)
    *** 07/07/10 06:18 am ***
    Looking at the code in MAIN (RDBMS_MAIN_LINUX_100705) the indexes are dropped
    using exec_force which ignores index doesn't exist errors.  Procedure init
    drops the following indexes:

    - utl_recomp_comp_idx1
    - utl_recomp_sort_idx1
    - utl_recomp_sort_idx2

    and is called at the start of recomp_parallel which is what recomp_serial
    calls passing the number of threads as 1.  So the very first thing it does it
    drop the indexes.

    The indexes are also referenced in function select_invalid_parallel_objs
    which:

    - drops utl_recomp_sort_idx1
    - drops utl_recomp_sort_idx2
    - creates utl_recomp_comp_idx1
    - creates utl_recomp_sort_idx1
    - drops utl_recomp_comp_idx1
    - creates utl_recomp_sort_idx2 if required.

    So yes utl_recomp_comp_idx1 could get left behind if the process fails mid
    way through this function however, upon the next rerun, it will attempt to
    drop all three again.

    Checking the package in 10.2.0.5.  Here procedure init does not drop the
    indexes - it only truncates the tables and resets the sequence.  So this
    problem is fixed in MAIN (11.2.0.2).  Checked to see where this is first
    fixed - 11.1.0.6. 

    *** 02/14/11 12:58 am *** (CHG: Sta->11 Sev->2)
    *** 02/14/11 12:58 am ***
    *** 02/14/11 02:13 am ***
    *** 02/14/11 02:13 am *** (CHG: Sta->35)
    *** 02/14/11 02:13 am ***
    *** 03/19/14 06:11 pm ***
    *** 04/04/14 12:30 am ***

  • 相关阅读:
    EF CodeFirst EntityTypeConfiguration 自关联映射配置
    DDD 领域驱动设计-看我如何应对业务需求变化,领域模型调整?
    DDD 领域驱动设计-看我如何应对业务需求变化,愚蠢的应对?
    【记录】ASP.NET XSS 脚本注入攻击
    【记录】JS 获取图片原始尺寸-防止图片溢出
    让 ASP.NET vNext 在 Mac OS 中飞呀飞。。。
    Building Modern Web Apps-构建现代的 Web 应用程序(一些感想)
    【记录】ASP.NET MVC RegisterBundles
    【记录】JS 生成 URL 二维码
    关于有默认值的字段在用EF做插入操作时的思考(续)
  • 原文地址:https://www.cnblogs.com/bwdata/p/3850509.html
Copyright © 2011-2022 走看看