【发布时间】:2018-11-23 18:14:35
【问题描述】:
Fehler beim Start in Zeile : 1 in Befehl -
DECLARE
retval NUMBER;
BEGIN
MONITORING.PERFORM_CHECK(1000705, retval);
END;
Fehlerbericht -
ORA-06519: Aktive lokale Transaktion erkannt und Rollback durchgeführt
ORA-06512: in "RR_MONITORING.MONITORING_ACTIVITY_LOG", Zeile 13
ORA-06512: in "RR_MONITORING.MONITORING", Zeile 43
ORA-06502: PL/SQL: numerischer oder Wertefehler: character string buffer too small
ORA-06512: in "RR_MONITORING.MONITORING_ACTIVITY_LOG", Zeile 10
ORA-06512: in "RR_MONITORING.MONITORING", Zeile 259
ORA-06519: Aktive lokale Transaktion erkannt und Rollback durchgeführt
ORA-06512: in "RR_MONITORING.MONITORING_ACTIVITY_LOG", Zeile 13
ORA-06512: in "RR_MONITORING.MONITORING", Zeile 1129
ORA-01422: Exakter Abruf gibt mehr als die angeforderte Zeilenzahl zurück
ORA-06512: in Zeile 4
06519. 00000 - "active autonomous transaction detected and rolled back"
*Cause: Before returning from an autonomous PL/SQL block, all autonomous
transactions started within the block must be completed (either
committed or rolled back). If not, the active autonomous
transaction is implicitly rolled back and this error is raised.
*Action: Ensure that before returning from an autonomous PL/SQL block,
any active autonomous transactions are explicitly committed
or rolled back.
哪些错误消息行包含根本原因错误? 先前的操作是否可能导致错误或错误必须在代码中? “字符串缓冲区太小” - ACTIVITY_LOG 或其他地方的错误?
create or replace PROCEDURE "MONITORING_ACTIVITY_LOG" (IN_KPI_DEF_ID_VAL IN VARCHAR DEFAULT 0,IN_OBJECT IN VARCHAR) AS
PRAGMA AUTONOMOUS_TRANSACTION;
err_code VARCHAR(100);
err_msg VARCHAR(200);
BEGIN
err_code :=SUBSTR(SQLCODE, 1, 100);
err_msg := SUBSTR(SQLERRM, 1, 200);
Insert into ACTIVITY_LOG(KPI_DEF_ID,EXCEPTION_IN,OBJECT,SQL_ERROR_CODE,SQL_ERROR_MESSAGE,TIMESTAMP) VALUES (IN_KPI_DEF_ID_VAL,'MONITORING',IN_OBJECT,err_code,err_msg,SYSDATE);
END;
【问题讨论】:
标签: oracle plsql error-handling transactions