下面是我的write_error_log程序。
CREATE OR REPLACE procedure
APMS.write_error_log ( errstr varchar2, errline varchar2)
IS
pragma autonomous_transaction;
-- this procedure stays in its own new private transaction
begin
INSERT INTO error_log
(err_tmsp,
err_msg,
err_line_no)
values (systimestamp,
errstr,
errline);
COMMIT; -- this commit does not interfere with the caller's transaction.
end write_error_log;
/
这是一个调用write_error_log过程来记录错误的过程示例。
CREATE OR REPLACE procedure APMS.mock_data_inserts
-- add parameters here to test procedure for more complex issue
as
BEGIN
INSERT INTO mockdata
VALUES ('textstring', '', 'mockcity');
exception when others then
write_error_log(sqlerrm,dbms_utility.format_error_backtrace);
raise;
END mock_data_inserts;
/
此外,这是一个侧面问题,如果它无法回答我明白:)但如果我要在上面的程序中添加一些参数,我会从哪里开始?或者更确切地说,是否有人知道一些研究参数的好资源?还在试图找出'IN,OUT,INOUT'
干杯!