# Appendix E. Database Schema

A database administrator needs to know the contents of the Log Central database table definitions to help determine which tables to back up and when to back them up.

This appendix summarizes all the database table definitions used by Log Central. It includes the following tables:

- Schema Tables

- Log Message Definitions

- Logging Levels

- Message Severities

- Subsystem Definitions

- Trap Classes

- Logged Message Data

- User Data

## Schema Tables

Table E-1 lists the schema tables.

> Table E-1 Table Summary

Table Name | Description
--- | ---
IL_MSG | Contains data pertaining to log message definitions.
IL_REP_MODE | Contains data pertaining to the log reporting modes.
IL_SEV | Contains data pertaining to the message severities.
IL_SUBS | Contains data pertaining to subsystem definitions.
IL_TRAP_CLASS | Contains data pertaining to SNMP trap classes.
IL_SM_LOG | Contains data pertaining to logged messages.
IL_USER | Contains data pertaining to users.

## Log Message Definitions

> Table E-2 IL_MSG

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
LOG_SUBS_NAME | Not null | CHAR | 8 | The name of the subsystem
LOG_MSG_ID | Not null | NUMBER | 5 | The message ID number
LOG_SDESC | Not null | CHAR | 40 | A short description of the log message
LOG_MSG_SEVERITY | Not null | NUMBER | 1 | The severity level.
LOG_REP_MODE | Not null | CHAR | 1 | The log reporting mode.
LOG_MSG_VERSION | Not null | NUMBER | 3 | The message version number.
LOG_MSG_MNEMONIC |  | CHAR | 40 | The name correlating a message to the software module in which it is defined.
LOG_MSG_PARSE_FNC |  | CHAR | 40 | The program to be executed when a live message arrives that maps with this message definition.
LOG_MSG_TRAP_ID |  | NUMBER | 6 | The ID number for the SNMP trap.
LOG_MSG_TRAP_ENABLED |  | NUMBER | 1 | The SNMP trap flag.
LOG_MSG_AUTO_ACK | Not null | NUMBER | 1 | Whether the message is auto-acknowledged.
LOG_MSG_DESC_REC | Not null | LONG |  | Description and recommendation in the following format: 5 digits representing the length of the description the description itself

- the recommendation, occupying the remainder of the field

## Logging Levels

> Table E-3 IL_REP_MODE

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
LOG_REP_MODE_ID | Not null | CHAR | 1 | The character that identifies the logging level. Valid values are `N`, `V`, `D`, and `S`.
LOG_REP_MODE_DESC | Not null | CHAR | 7 | The string that describes the logging level. Valid values are: `Normal`, `Verbose`, `Debug`, and `Special`.

## Message Severities

> Table E-4 IL_SEV

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
LOG_SEV_ID | Not null | NUMBER | 1 | A number that identifies the severity level. Valid values are: `1`, `2`, `3`, `4`, `5`.
LOG_SEV_DESC | Not null | CHAR | 13 | The string that describes the severity level. Valid values are: `Informational`, `Warning`, `Minor`, `Major`, `Critical`.
LOG_SEV_TRAP_ID | Not null | NUMBER | 1 | The ID number for the SNMP trap, based on message severity. Valid values are any 6-digit number.
LOG_SEV_TRAP_ENABLED | Not null | NUMBER | 1 | The SNMP trap flag, based on message severity. Valid values are `0` and `1`.

## Subsystem Definitions

> Table E-5 IL_SUBS

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
LOG_SUBS_NAME | Not null | CHAR | 8 | A string that identifies the subsystem name.
LOG_SUBS_DESC |  | CHAR | 40 | A string that describes the subsystem name.

## Trap Classes

> Table E-6 IL_TRAP_CLASS

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
LOG_TRAP_CLASS_NAME | Not null | CHAR | 16 | The name of the SNMP trap class. Valid values are: `message` and `severity`.
LOG_TRAP_CLASS_ENABLED | Not null | NUMBER | 1 | A flag to enable or disable SNMP traps in the specified class. Valid values are 0 and 1.

## Logged Message Data

> Table E-7 IL_SM_LOG TABLE

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
MSG_KEY_TS | Not null | DATE |  | A time stamp indicating when the message was logged.
MSG_KEY_CTR | Not null | NUMBER | 3 | A counter for multiple messages received in the same second.
MSG_LOG_ID |  | CHAR | 3 | The log ID string.
MSG_REP_MODE | Not null | CHAR | 1 | The logging level.
MSG_SEVERITY | Not null | NUMBER | 1 | The message severity.
MSG_SS_NAME | Not null | CHAR | 8 | The subsystem name.
MSG_ID | Not null | NUMBER | 5 | The message ID number.
MSG_HOST_NAME | Not null | CHAR | 20 | The name of the sending host.
MSG_PID | Not null | NUMBER | 5 | The process ID.
MSG_UID | Not null | CHAR | 8 | The user ID.
MSG_FCT_NAME |  | CHAR | 40 | The name of the function.
MSG_TRAN_KEY |  | CHAR | 21 | The transaction ID.
MSG_VERSION | Not null | NUMBER | 3 | The message body version number. This is a reserved field.
MSG_TEXT |  | LONG | 2000 | The message body.

## User Data

> Table E-8 IL_USER TABLE

Field Name | Null? | Type | Size | Description
--- | --- | --- | --- | ---
USERNAME | Not null | CHAR | 10 | User name.
PASSWORD | Not null | CHAR | 10 | Password.
FIELDS |  | CHAR | 100 | Displayed fields. Stores list of fields displayed in the Message Definition Browser.
ORDERS |  | CHAR | 100 | Field order. Stores the order in which the display fields will be seen.