CREATE OR REPLACE PROCEDURE SP_ERROR_LOGS_PRO(v_pro_name VARCHAR2, v_step_name VARCHAR2, v_date VARCHAR2, v_detail VARCHAR2 default '', error_flag BOOLEAN DEFAULT TRUE) AUTHID DEFINER AS pragma autonomous_transaction; nError_code NUMBER; strError_Msg NVARCHAR2(2000); BEGIN nerror_code := SQLCODE; strerror_msg := SQLERRM; INSERT INTO ERROR_LOGS VALUES (sq_log_iid.NEXTVAL, SYSDATE, v_pro_name, v_step_name, v_date, nerror_code, strerror_msg, v_detail); COMMIT; END;