先看下效果
--------------------------------------------------------------------------------------------------------------建一个日志表
create table T_ERROR_LOG
(
error_log_id VARCHAR2(32) default sys_guid() not null,
owner VARCHAR2(30),
package_name VARCHAR2(30),
procedure_name VARCHAR2(30),
error_comment VARCHAR2(1000),
error_backtrace VARCHAR2(400),
error_stack VARCHAR2(4000),
call_stack VARCHAR2(4000),
oracle_execute_user VARCHAR2(50),
um_id VARCHAR2(50),
s_time VARCHAR2(90),
e_time VARCHAR2(90),
v_rownum_q VARCHAR2(4000),
v_rownum_z VARCHAR2(4000),
v_rownum_h VARCHAR2(4000),
o_message VARCHAR2(90),
c_time NUMBER
);
-- Add comments to the table
comment on table T_ERROR_LOG
is '程序错误日志表';
-- Add comments to the columns
comment on column T_ERROR_LOG.error_log_id
is '错误日志id';
comment on column T_ERROR_LOG.owner
is '属主';
comment on column T_ERROR_LOG.package_name
is '包名';
comment on column T_ERROR_LOG.procedure_name
is '过程名';
comment on column T_ERROR_LOG.error_comment
is '错误备注';
comment on column T_ERROR_LOG.error_backtrace
is '错误跟踪';
comment on column T_ERROR_LOG.error_stack
is '错误堆栈';
comment on column T_ERROR_LOG.call_stack
is '调用堆栈';
comment on column T_ERROR_LOG.oracle_execute_user
is 'oracle执行用户';
comment on column T_ERROR_LOG.um_id
is '操作人员um账号';
comment on column T_ERROR_LOG.s_time
is '开始时间';
comment on column T_ERROR_LOG.e_time
is '结束时间';
comment on column T_ERROR_LOG.v_rownum_q
is '执行前数据量';
comment on column T_ERROR_LOG.v_rownum_z
is '所操作数据量';
comment on column T_ERROR_LOG.v_rownum_h
is '执行后数据量';
comment on column T_ERROR_LOG.o_mes