CLEAR EVENTS

This command deletes indexing events from an index's event view. Use the event view for administration purposes. The name of the event view is found in the EVENTVIEWNAME column of the DB2EXT.TEXTINDEXES view.

Authorization

According to DB2 catalog views, the user ID in this command must have CONTROL privilege on the table for which the full-text index was created.

Command syntax

Read syntax diagramSkip visual syntax diagram>>-CLEAR-EVENTS-FOR-INDEX--------------------------------------->

>--+------------------+--index-name--FOR-TEXT------------------->
   '-index-schema-"."-'

>--+--------------------+--+----------------------+------------><
   '-COMMITCOUNT--count-'  '-|connection-options|-'

connection-options:

|--+--------------------------------------------------------------+--|
   '-CONNECT-TO--database-name--+-------------------------------+-'
                                '-USER--userid--USING--password-'

Command parameters

index-schema
The schema of the text index as specified in the CREATE INDEX command. If no schema is specified, the user ID of the DB2 connection is used.
index-name
The name of the text index as specified in the CREATE INDEX command.
COMMITCOUNT count
An INTEGER value >=0 displays the number of rows deleted in one transaction by DB2.
CNNECT TO database-name
The name of the database that is target for this command. You can omit this parameter, if DB2DBDFT is set and the user is running the command on the server. Note that the user ID must have the required DB2 authorizations.
USER userid USING password
Use a password and userid to connect to the database. If not specified, a connection is attempted from the current user ID without a password.

Usage

When you schedule regular updates using the UPDATE FREQUENCY option in the CREATE or ALTER INDEX commands, regularly check the event table. Use CLEAR EVENTS to clean up the event tables, after you have checked the reason for the event and removed the source of the error.

Try to ensure consistency between the contents of the text columns in the table and the index, especially when re-indexing documents.

You cannot issue the command if one of the following commands is running on the index: