The command changes the characteristics of a full-text index, for example, the update options and the storage options.
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.
>>-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-'
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.
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.
You cannot issue the command if one of the following commands is running on the index:
If you create the index with a cache option, you can not use the ALTER INDEX command for the index directory when the index is activated. You must first deactivate the cache.
In a distributed DB2 environment, a text index with cache options is only allowed on a single-noded tablespace.