DB2 10.5 for Linux, UNIX, and Windows

SYSIBMTS.TSEVENT view

The event view provides information about indexing status and error events.

A database might have multiple views with the prefix SYSIBMTS.TSEVENT. Each view is differentiated by the nnnnnn value, an internal identifier that points to the corresponding text index that the view is associated with. To determine the text search index associated with a particular view, query the view SYSIBMTS.TSINDEXES, searching for the schema name and view name in the columns EVENTVIEWSCHEMA and EVENTVIEWNAME. The query returns a single row that describes the text search index and user table in question.

The number of columns in this view depends on the number of primary key columns in the user table. The columns PK1..PKnn match the primary key columns of the user table and have corresponding data type and lengths definitions. The data type of each of the columns in the view exactly corresponds to the data type of the corresponding primary key column.

Each row in this view represents a message from an UPDATE INDEX command on the text search index. For instance, a row might indicate that an UPDATE INDEX command has started or has completed. Alternatively, a row might describe a problem that occurred when a text document was being indexed. You can identify the text document by retrieving the primary key column values from the row in this view and looking them up in the user table.

You can clear events by using the db2ts CLEAR EVENTS FOR INDEX command.

Table 1. Event view
Column name Data type Nullable? Description
OPERATION INTEGER YES The operation (insert, update, or delete) on the base table to be reflected in the text search index
TIME TIMESTAMP YES Time stamp of event entry creation
SEVERITY INTEGER YES If the message corresponds to a single document, one of the following values:
  • 1 = Informational
  • 4 = Parts of the document were indexed but there was a warning, as indicated by the message
  • 8 = The document was not indexed, as indicated by the message
  • 0= Otherwise
SQLCODE INTEGER YES SQLCODE for the associated error, if any
MESSAGE VARCHAR(1024) YES Text information about the specific error
PARTITION INTEGER YES Reserved for internal IBM use.
PK01 Data type of the first primary key column of the base table YES Value of the first primary key column of the base table of the text search index for the row being processed when the event occurred
... ... ... ...
PKnn Data type of the last primary key column of the base table YES Value of the last primary key column of the base table of the text search index for the row being processed when the event occurred

Informational events, such as starting, committing, and finishing update processing are also available in this view. In this case, PK01, PKnn and OPERATION all have NULL values. The code page and the locale of MESSAGE correspond to the database settings.