无法重建索引Oracle

时间:2019-12-04 13:28:56

标签: oracle indexing

我有一个场景,其中我试图触发一个场景中的重组。 以下是相同的示例代码:

CREATE OR REPLACE TRIGGER ALPHA.BETA
    AFTER STARTUP ON DATABASE
    DECLARE
        DAY NUMBER;
        HOUR NUMBER;
        RUN_DATE NUMBER := 3;
        RUN_HOUR NUMBER := 12;
    BEGIN
        SELECT TO_CHAR(SYSDATE, 'D') INTO DAY FROM DUAL;
        SELECT TO_CHAR(SYSDATE, 'HH24') INTO HOUR FROM DUAL;
        IF( DAY = RUN_DATE AND HOUR < RUN_HOUR ) THEN
            EXECUTE IMMEDIATE 'ALTER TABLE ALPHA."BETA" MOVE TABLESPACE ALPHA2 PARALLEL 15';
            EXECUTE IMMEDIATE 'ALTER INDEX ALPHA."BETA~0" REBUILD ONLINE PARALLEL 8';
            EXECUTE IMMEDIATE 'ALTER TABLE ALPHA."BETA" MOVE ONLINE LOB(GAAMA) STORE AS (TABLESPACE ALPHA2) PARALLEL 15;
        END IF;
    END BETA;
/

以上触发器引发ORA-12838异常

0 个答案:

没有答案