/*****************************************************************************
*
* Filename         - $Workfile:   oracle_error.sql  $
*
*                     Name              Date      Version     CR Number
*                      Yomi Kogge                 
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         - Live Schema: oracle_error 
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*****************************************************************************/

PROMPT Creating table ORACLE_ERROR

create table oracle_error(
   process_name                  varchar2(100),
   errror_msg                    varchar2(300),
   error_code                    number(10),
   error_time                    date,
   row_create_time               date,
   row_date_time                 date,
   cuser                         varchar2(30),
   muser                         varchar2(30),
   mterm                         varchar2(64),
   source                        varchar2(8),
   to_be_archived                varchar2(1),
   appn_row_id                   number(18) not null,
   system_id                     number(4) default 0 not null
);

alter table oracle_error add ( constraint oracle_error_pk primary key (appn_row_id) using index tablespace &1._indexes);

COMMENT ON TABLE ORACLE_ERROR IS 'This table contains a list of Oracle errors that have been received by the application';

COMMENT ON COLUMN ORACLE_ERROR.ERROR_CODE IS  'Oracle error code';
COMMENT ON COLUMN ORACLE_ERROR.ERROR_TIME IS  'Time the error was raised';
COMMENT ON COLUMN ORACLE_ERROR.ERRROR_MSG IS  'Error message received';
COMMENT ON COLUMN ORACLE_ERROR.PROCESS_NAME IS  'Process that received the error';
COMMENT ON COLUMN ORACLE_ERROR.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN ORACLE_ERROR.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN ORACLE_ERROR.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN ORACLE_ERROR.CUSER IS 'The user who created the row';
COMMENT ON COLUMN ORACLE_ERROR.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN ORACLE_ERROR.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN ORACLE_ERROR.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN ORACLE_ERROR.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN ORACLE_ERROR.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
