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 ***

  • 相关阅读:
    最大子数组求和并进行条件组合覆盖测试
    Ubuntu 16.04 c++ Google框架单元测试
    The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If execu
    Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
    个人博客作业三:微软小娜APP的案例分析
    补交 作业一
    补交 作业二:个人博客作业内容:需求分析
    嵌入式软件设计第12次实验报告
    嵌入式软件设计第11次实验报告
    嵌入式软件设计第10次实验报告
  • 原文地址:https://www.cnblogs.com/bwdata/p/3850509.html
Copyright © 2011-2022 走看看