CREATE OR REPLACE Procedure Stp_Running_Log(p_Seq_No Number, --serial number
p_Package_Name Varchar2, --package name
p_Proc_Name Varchar2, --procedure name
p_Excep_Desc Varchar2, --exception description
p_Excep_Remk Varchar2, --exception note: BEGIN means start END means end ERROR means Failure
p_Line_No Number, -- exception line number
p_Call_Sno Number, -- call sequence number
p_Excep_Dt Date Default Sysdate, -- exception time
p_Excep_Code Varchar2 Default 0, --Exception code
p_Receiveraddress Varchar2 Default Null) --mail receiving address, which can be sent to multiple addresses at the same time, separate addresses with "," or ";"
As
Begin
Insert Into Tl_Exception_Log
(Seq_No,
Package_Name,
Procedure_Name,
Exception_Tm,
Exception_Code,
Exception_Desc,
Exception_Remk,
Line_No,
Call_No)
Values
(p_Seq_No,
Substr(p_Package_Name, 1, 120),
Substr(p_Proc_Name, 1, 120),
p_Excep_Dt,
Substr(p_Excep_Code, 1, 60),
Substr(p_Excep_Desc, 1, 1000),
Substr(p_Excep_Remk, 1, 600),
p_Line_No,
p_Call_Sno);
Commit; --Send
an email to the relevant person when an exception occurs
/* No need to send an email
IF P_EXCEP_CODE = -1 AND p_ReceiverAddress IS NOT NULL THEN
STP_SENDEMAIL(P_TXT => P_PACKAGE_NAME||'.'||P_PROC_NAME||' '||P_EXCEP_DESC,
P_SUB => 'PROCEDURE RUNNING ERROR',
P_RECEIVER => p_ReceiverAddress);
END IF;
*/
Exception
When Others Then
Dbms_Output.Put_Line( 'STP_RUNNING_LOG' || Sqlcode || ':' || Sqlerrm);
Rollback;
End Stp_Running_Log;
Memory Abnormal Log
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326942847&siteId=291194637
Ranking