Preventive measures against Net Search Extender index file corruption

A corrupt index file is indicated by error messages that are recorded in the event table of the index, reporting kernel errors with various reason codes, depending on which files were affected by the corruption.

For example: The message similar to the following one would be present in the eventview if an update index is attempted when the index is corrupted.

101 CTE0101 A search engine operation failed. Reason code: "7", "100001", "0", "Kernel return code: 17

You cannot repair a corrupt index; you must drop and re-create it. To avoid having a corrupt index, take the following precautions:

  • For production systems, specify an index and work directory in the CREATE INDEX statement instead of using the default directory for Net Search Extender indexes, which is located in the home directory of the instance owner. Use a separate file system for both the index and the work directories, and monitor the file system to ensure that it has sufficient free disk space for update operations. The amount of disk space needed for an update depends on the size of the index (in particular, the size of the secondary index) and the amount of data to be processed during the update. To help estimate the amount of disk space needed, monitor peak usage during update operations.
  • To avoid index file corruption caused by Windows access violation errors, take the following steps:
    • Exclude the text index and working directories from automatic backup programs.
    • Exclude the index directories from antivirus scan programs.
    • Turn off the Windows Indexing Service for the drives where you store the index and work files.
  • Before you shut down the system, correctly stop Net Search Extender by using the following commands:
    • db2text control list all locks for database database name; repeat this command until no locks are held. For more information, see the description of the UPDATE INDEX command.
    • db2text stop