久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

ORA-06519: 檢測到活動的自治事務(wù)處理,已經(jīng)回退

 168一路發(fā) 2011-03-22
一,、ORA-06519錯誤出現(xiàn)
我往數(shù)據(jù)庫中一個表中寫數(shù)據(jù),這個表中對insert做了一個自治事務(wù)觸發(fā)器
后臺報錯,, ORA-06519: 檢測到活動的自治事務(wù)處理,,已經(jīng)回退
請問一下,這個自治觸發(fā)器應(yīng)該如何處理才能避免這種問題
二,、錯誤解釋
[oracle@CCN-BJ-1-538 ~]$ oerr ora 6519
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.
//-----------------------------------------------------------------------
//
// 06520 through 06529 reserved for Foreign function errors
//
三觸發(fā)器內(nèi)容:
CREATE OR REPLACE TRIGGER get_pi_ip_cus_insert
   AFTER INSERT
   ON pw_attemper_correlative_area
   REFERENCING NEW AS NEW
   FOR EACH ROW
DECLARE
   PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
   COMMIT;
   gt_operateswitch_pkg.operate_switch_end@pw2gis (:NEW.OID,
                                                   :NEW.log_id,
                                                   :NEW.from_area_id,
                                                   :NEW.to_area_id,
                                                   :NEW.pi_type,
                                                   :NEW.start_time,
                                                   :NEW.end_time
                                                  );
   COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
      NULL;
END;
 
四,、metalink給出的解決方案:
 TIP:  Click help for a detailed explanation of this page.
 書簽 轉(zhuǎn)到末尾
主題:  ORA-06519 ORA-06512 Errors When Executing A Procedure Having Autonomous Transaction
  文檔 ID:  注釋:309285.1 類型:  PROBLEM
  上次修訂日期:  11-OCT-2007 狀態(tài):  PUBLISHED
"Checked for relevance on 11-OCT-2007"
In this Document
  Symptoms
  Cause
  Solution
  References

Applies to:
PL/SQL - Version: 9.2.0.6
This problem can occur on any platform.
Symptoms
The following errors occur when executing a PL/SQL procedure:

ORA-06519: active autonomous transaction detected and rolled back
ORA-06512: at "%s.%s", line 36
ORA-06512: at line 4

This PL/SQL Procedure uses Autonomous Transactions.
Cause
If no commit or rollback is done before exiting the PL/SQL Procedure, then at the point of executing the "return" or "end" statement the whole autonomous transaction is rolled back with the errors mentioned above.
 
 
Solution
Add a commit or rollback statement in the code so that the PL/SQL Procedure gets successfully compiled and executed.
Note: If there are any Exception Handler Section in the code, then add a commit or rollback statement for every exception that is handled.
 

References
Note 75199.1 - OERR: ORA-6519 active autonomous transaction detected and rolled back
Errors
ORA-6512 "at %sline %s"
ORA-6519 active autonomous transaction detected and rolled back
Keywords
'AUTONOMOUS'  
 
經(jīng)過檢查果然是遠程存儲過程沒有commit或rollback,加上commit后成功執(zhí)行。

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多