DROP TABLE IF EXISTS PROCEDURE_EXCEPTION_LOG;
CREATE TABLE PROCEDURE_EXCEPTION_LOG
(
    S_TIME	timestamp not null comment '操作时间',
    S_code	varchar2(255) comment '错误代码',
    S_PROCNAME	VARCHAR2(64) comment '执行存储过程名称',
    S_MSG	string comment '错误信息'
)
CLUSTERED BY (S_TIME) INTO 2 BUCKETS
STORED AS ORC TBLPROPERTIES ("transactional"="true");

CREATE OR REPLACE PROCEDURE log_exception(p_procname string,p_msg String,p_code string ) -- 创建存储过程
IS
BEGIN
	insert into PROCEDURE_EXCEPTION_LOG VALUES (SYSDATE,p_code,p_procname,p_msg)
END;