三、oracle中的日志
2018-12-28 本文已影响0人
lifeline张
-- Create table
create table T_LOG
(
id NUMBER(20) not null,
proc_name VARCHAR2(100),
info VARCHAR2(4000),
log_level VARCHAR2(10),
time_stamp TIMESTAMP(6),
error_backtrace VARCHAR2(4000),
err_stack VARCHAR2(4000),
step_no VARCHAR2(60),
log_date VARCHAR2(8)
)
tablespace FORLEARNING
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table T_LOG
is '系统日志表';
-- Add comments to the columns
comment on column T_LOG.id
is '日志ID';
comment on column T_LOG.proc_name
is '程序名';
comment on column T_LOG.info
is '摘要';
comment on column T_LOG.log_level
is '日志等级';
comment on column T_LOG.time_stamp
is '时间戳';
comment on column T_LOG.error_backtrace
is '错误回溯';
comment on column T_LOG.err_stack
is '错误堆栈';
comment on column T_LOG.step_no
is '步骤';
comment on column T_LOG.log_date
is '日志日期';
-- Create/Recreate primary, unique and foreign key constraints
alter table T_LOG
add constraint PK_T_PLIS_LOG primary key (ID)
using index
tablespace FORLEARNING
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);