10.1 Event Log Columns

This section describes columns in the event log table. Columns are ordered by position.

10.1.1 record_id

The record_id column is used to uniquely identify rows in the event log table and order publication events. This column must contain sequential, ascending, positive, unique integer values. Gaps between record_id values no longer prematurely end a polling cycle.

10.1.2 table_key

Format values for this column are exactly the same in all triggers for a logical database class. The BNF or Backus Naur Form of this parameter is defined below:

<table-key> ::= <unique-row-identifier> {"+" 
                <unique-row-identifier>}

<unique-row-identifier> ::= <primary-key-column-name> "=" <value>

For example, for the usr table referenced throughout this chapter, this column’s value might be idu=1.

For the view_usr view referenced throughout this chapter, this column’s value might be pk_empno=1.

For a hypothetical compound primary key (one containing multiple columns), this column’s value might be pkey1=value1+pkey2=value2.

If primary key values placed in the table_key field contain any of the special characters {, ; ' + " = \ < >}, where { and } contain the set of special characters, delimit the value with double quotes. You also need to escape the double quote character " as \" and the literal escape character \ as \\ when they are contained inside a pair of double quotes.

For a hypothetical primary key containing special characters, this column’s value might be pkey=", ; ' + \" = \\ < >". (Note the double quotes and escaped characters.)

Differences in padding or formatting might result in out-of-order event processing. For performance reasons, remove any unnecessary white space from numeric values. For example, idu=1 is preferred over idu= 1.

10.1.3 status

The status column indicates the state of a given row. The following table lists permitted values:

Table 10-1 Permitted Values for Status Columns

Character Value

Interpretation

N

new

S

success

W

warning

E

error

F

fatal

To be processed, all rows inserted into the event log table must have a status value of N. The remainder of the status characters are used solely by the Publisher channel to designate processed rows. All other characters are reserved for future use.

Status values are case sensitive.

10.1.4 event_type

Values in this column must be between 1 and 8. All other numbers are reserved for future use.

The following table describes each event type:

Table 10-2 Event Types

Event Type

Interpretation

1

insert field

2

update field

3

update field (remove all values)

4

delete row

5

insert row (query-back)

6

update row (query-back)

7

insert field (query-back)

8

update field (query-back)

For additional information on this field, see Section 10.2, Event Types.

10.1.5 event_time

This column serves as an alternative ordering column to record_id. It contains the effective date of the event. It must not be NULL. For this column to become the ordering column, set the Enable Future Event Processing parameter to Boolean True. See Enable Future Event Processing?.

10.1.6 perpetrator

This column identifies the database user who instigated the event. A NULL value is interpreted as a user other than the driver user. Rows with a NULL value or value not equal to the driver’s database username are published. Rows with a value equal to the driver’s database username are not published unless the Allow Loopback Publisher parameter is set to Boolean True. See Allow Loopback?.

10.1.7 table_name

The name of the table or view where the event occurred.

10.1.8 column_name

The name of the column that was changed. This column is used only for per-field (1-3, 7-8) event types. Nevertheless, it must always be present in the event log table. If it is missing, the Publisher channel cannot start.

10.1.9 old_value

The field’s old value. This column is used only for per-field, non-query-back event types (1-3). Nevertheless, it must always be present in the event log table. If it is missing, the Publisher channel cannot start.

10.1.10 new_value

The field’s new value. This column is used only by per-field, non-query-back event types (1-3). Nevertheless, it must always be present in the event log table. If it is missing, the Publisher channel cannot start.