我已經創建了一個使用oracle sql developer調用一個過程的觸發器。下面是觸發代碼:沒有更多數據從套接字讀取(Oracle SQL Developer)
CREATE OR REPLACE TRIGGER noteTrigger
BEFORE
INSERT OR
UPDATE OF valoare OR
DELETE
ON note
BEGIN
CASE
WHEN INSERTING THEN
DBMS_OUTPUT.PUT_LINE('Inserting');
updateBursa();
WHEN UPDATING('valoare') THEN
DBMS_OUTPUT.PUT_LINE('Updating valoare');
updateBursa();
WHEN DELETING THEN
DBMS_OUTPUT.PUT_LINE('Deleting');
updateBursa();
END CASE;
END;
/
現在,程序寫在這裏:
CREATE OR REPLACE PROCEDURE updateBursa IS
v_countBursieri NUMBER := 0;
BEGIN
UPDATE STUDENTI SET bursa = null;
FOR v_i IN (SELECT nr_matricol from studenti natural join note group by nr_matricol having avg(valoare) =
(select max(avg(valoare)) from studenti natural join note group by nr_matricol)) LOOP
v_countBursieri := v_countBursieri + 1;
END LOOP;
FOR v_i IN (SELECT nr_matricol from studenti natural join note group by nr_matricol having avg(valoare) =
(select max(avg(valoare)) from studenti natural join note group by nr_matricol)) LOOP
UPDATE STUDENTI SET bursa = 1000/v_countBursieri where nr_matricol = v_i.nr_matricol;
END LOOP;
END;
/
當我試圖通過這個修改注表:
INSERT INTO note VALUES ('111', '25', 5, TO_DATE('20/06/2015', 'dd/mm/yyyy'));
我得到錯誤:
Error report -
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [kqlidchg0], [], [], [], [], [], [], [], [], [], [], []
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_PLSCOPE_SIG_IDENTIFIER$) violated
00603. 00000 - "ORACLE server session terminated by fatal error"
*Cause: An Oracle server session was in an unrecoverable state.
*Action: Log in to Oracle again so a new server session will be created
automatically. Examine the session trace file for more
information.
Error report -
SQL Error: No more data to read from socket
MoS上有許多已發佈的錯誤和一些對未發佈的錯誤的引用,因此您可能需要提高SR以從Oracle獲得指導。您可以在重新編譯包和觸發器之前嘗試禁用PL/Scope,但不確定這是否有幫助。而一些錯誤表明他們可能導致腐敗。值得檢查警報日誌和跟蹤文件,並評估影響。 –
當您發生ora 600錯誤時,請始終輸入一個SR。有可能是其他人有類似的問題,他們可以爲你解決它或想出一個解決方法。另外,你是否檢查會話跟蹤文件? –