This section describes columns in the event log table. Columns are ordered by position.
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.
table_key
Format values for this column 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.
NOTE:If primary key values placed in the table_key field contains any of the special characters {, ; ' + " = \ < >}, where ’{’ and ’}’ contain the set of special characters, delimit the value with double quotes. You’ll also need to escape the double quote character " as \" and the literal escape character \ character as \\ when 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.)
NOTE: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". (Note the space in “idu= 1”.)
status
The status column indicates the state of a given row. The following table lists permitted values:
Table 12-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.
NOTE:Status values are case sensitive.
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 12-2 Event Types
For additional information on this field, see Section 12.2, Event Types.
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?.
perpetrator
This column identifies the database user who instigated the event. A NULL value is interpreted as a user other than the driver user. As such, 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?.
table_name
The name of the table or view where the event occurred.
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.
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.
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.