所以我正在嘗試創建一個存盤函式,但我不斷收到此錯誤:
Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-20900: No access to modify schema
ORA-06512: at line 3
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
事實是,2-3 小時前,我創建了一些功能,并且作業起來非常有魅力。我真的不明白發生了什么。
這里的代碼(我不知道這是否相關,因為函式甚至不去編譯)
CREATE OR REPLACE FUNCTION wsxsxfunct(x_data number)
return ECHIPE.id_echipa%type IS
y ECHIPE.id_echipa%type;
BEGIN
SELECT ID_ECHIPA INTO y
FROM ECHIPE E, PILOTI P, REZULTATE R, CURSE C
WHERE P.ID_PILOT = R.ID_PILOT
AND E.ID_ECHIPA = P.ECHIPA
AND R.ID_CURSA = C.ID_CURSA
AND EXTRACT(MONTH FROM C.DATA_CURSA) = x_data;
RETURN y;
EXCEPTION
WHEN NO_DATA_FOUND
THEN dbms_output.put_line('Nu a avut loc nicio cursa in luna ' || x_data);
RAISE_APPLICATION_ERROR(-20000,
'Nu exista angajati cu numele dat');
WHEN TOO_MANY_ROWS
THEN dbms_output.put_line('Au avut loc mai multe curse in luna ' || x_data);
RAISE_APPLICATION_ERROR(-20001,
'Exista mai multi angajati cu numele dat');
WHEN OTHERS
THEN dbms_output.put_line('Trebuie sa apelezi functia cu un numar intre 1-12, reprezentand numarul lunii');
RAISE_APPLICATION_ERROR(-20002,'Alta eroare!');
END;
/
忽略代碼中的那些訊息。謝謝
編輯:
我嘗試了幾個小時前創建的函式中的舊代碼,但仍然收到相同的錯誤報告。
uj5u.com熱心網友回復:
ORA-20900(通常是 20000 和 20999 之間的錯誤)是“自定義”錯誤,即它們來自對 RAISE_APPLICATION_ERROR 的呼叫。
因此,這不是(本機)特權問題。很可能是管理員創建了一個 DDL 觸發器,該觸發器阻止了您創建函式(以及可能的其他物件)的嘗試。
與您的 DBA 交談。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/408196.html
標籤:
