The command changes the characteristics of a full-text index, for example, the update options and the storage options.
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
>>-ALTER-INDEX--+------------------+--index-name--FOR-TEXT------> '-index-schema-"."-' >--+--------------------------+--+-------------------+----------> '-|update-characteristics|-' '-|storage-options|-' >--+----------------------+------------------------------------>< '-|connection-options|-' storage-options |--+----------------------------+-------------------------------> '-INDEX-DIRECTORY--directory-' >--+-------------------------------+----------------------------> '-WORK-DIRECTORY--workdirectory-' >--+------------------------------------------------+-----------> '-CACHE TABLE--+-PERSISTENT--+---------------+-+-' | '-IN--directory-' | '-TEMPORARY---------------------' >--+---------------------+--+-----------------------------+-----| '-PCTFREE--percentage-' '-MAXIMUM CACHE SIZE--memsize-' update-characteristics |--+------------------------------------------+-----------------> '-UPDATE-FREQUENCY--+-NONE---------------+-' '-|update-frequency|-' >--+----------------------------+-------------------------------> '-UPDATE-MINIMUM--minchanges-' >--+-------------------------------+----------------------------| '-COMMITCOUNT-FOR-UPDATE--count-' update-frequency |--D--(--+-*---------+--)--H--(--+-*----------+--)--M-----------> | .-,-----. | | .-,------. | | V | | | V | | '---0...6-+-' '---0...23-+-' .-,------. V | >--(----0...59-+--)---------------------------------------------| connection-options |--+--------------------------------------------------------------+--| '-CONNECT-TO--database-name--+-------------------------------+-' '-USER--userid--USING--password-'
Command parameters
Note that in a distributed DB2 environment, this directory has to exist on every node. A subdirectory, NODE<nr>, is created under the directory to distinguish indexes on logical nodes of a server. Any index files from the previous index directory are deleted.
If the directory does not exist, it is created for the DB2 instance owner user ID. If it exists, ensure that the directory has read/write permissions on UNIX platforms for the instance owner.
Note that in a distributed DB2 environment, this directory has to exist on every node. A subdirectory, NODE<nr>, is created under the directory to distinguish indexes on logical nodes of a server. Any temporary index files from the previous index directory are deleted.
The previously created persistent cache is moved to a new location. This location always requires a deactivated index.
If the integer is too small, the ACTIVATE CACHE command fails. The actual cache size is calculated during the ACTIVATE CACHE command. This change requires a deactivated index.
If you do not specify the UPDATE FREQUENCY keyword, the frequency settings are left unchanged.
Note that you can only change the UPDATE MINIMUM if you did not create the index using the RECREATE ON UPDATE option.
Note that you can only change COMMITCOUNT if you did not create the index using the RECREATE ON UPDATE option.
Also note that you cannot change COMMITCOUNT if you did create the index with the REPLICATION clause.
Usage
You cannot issue the command if one of the following commands is running on the index:
In a distributed DB2 environment, a text index with cache options is only allowed on a single-noded tablespace.