Oracle General log table Design

Source: Internet
Author: User

-- Create Sequence
Create sequence seq_common_log
Minvalue 1
Max value 999999999999999999999999999
Start with 1
Increment by 1
Cache 20;

 

-- Create Table
Create Table tu_common_log
(
Col_sequence number (20) not null,
Col_date date default sysdate not null,
Col_system varchar2 (100 ),
Col_package varchar2 (100 ),
Col_function_procedure varchar2 (100 ),
Col_message varchar2 (4000 ),
Col_is_exception varchar2 (1) default 'n'
)
Tablespace users
Pctfree 10
Initrans 1
Maxtrans 255
Storage
(
Initial 64 K
Next 1 m
Minextents 1
Maxextents Unlimited
);
-- Add comments to the table
Comment on table tu_common_log
Is 'General log table ';
-- Add comments to the columns
Comment on column tu_common_log.col_sequence
Is 'record sequence (obtained from seq_common_log )';
Comment on column tu_common_log.col_date
Is 'record generation time ';
Comment on column tu_common_log.col_system
Is 'Ownership system ';
Comment on column tu_common_log.col_package
Is 'Log package ';
Comment on column tu_common_log.col_function_procedure
Is 'function or stored procedure of the log ';
Comment on column tu_common_log.col_message
Is 'Log details ';
Comment on column tu_common_log.col_is_exception
Is 'whether the log is abnormal information y indicates exception information n indicates non-Exception Information ';

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.