Starting with DB2® Version
10.1 Fix Pack 1, detects corruption or other abnormalities in Net
Search Extender text indexes. This command can check the consistency
between mapping indexes and internal indexes to ensure that data is
being cataloged correctly.
Authorization
- The authorization ID must have at least read permission for the
text index directory.
- An user who can perform operations at the database instance level
has the required privileges to run this utility.
Syntax
>>-checknseindex--+----------------------------------+---------->
+-| index-path-clause |------------+
+-| index-database-clause |--------+
'-| table-column-database-clause |-'
>--+-----+--+-------------+--+-----+---------------------------><
'- -v-' '- -deepCheck-' '- -h-'
index-path-clause
|-- -p--absolute_index_path-- -i--index_id----------------------|
index-database-clause
|-- -indschema--index_schema_name-- -indname--index_name-------->
>-- -dbname--database_name--------------------------------------|
table-column-database-clause
|-- -tabschema--table_schema_name-- -tabname--table_name-------->
>-- -colname--column_name-- -dbname--database_name--------------|
Parameters
- -p absolute_index_path
- Specifies the absolute path of an index directory.
- -i index_id
- Specifies ID of the index to verify.
- -indschema index_schema_name
- Specifies the index schema for which NSE index is validated.
- -indname index_name
- Specifies the index name for which NSE index is validated.
- -dbname database_name
- Specifies the database name in which NSE index is created.
- -tabschema table_schema_name
- Specifies the table schema for which NSE index belongs to and
requires validation.
- -tabname table_name
- Specifies the table name for which NSE index belongs to and requires
validation.
- -colname column_name
- Specifies the column name of table on which NSE index is created
and requires validation.
- -v
- Displays verbose tool output.
- -deepCheck
- Checks both Net Search Extender mapping indexes and internal indexes
to verify that they are in sync. If you run the utility without the -deepCheck parameter
and the utility reports that the indexes are valid but one of the
following conditions applies, rerun the utility with the -deepCheck parameter:
- Search queries return errors and do not have specific error codes
or explanations.
- Search results do not reflect newly added or updated text documents.
- The index update fails.
- Kernel error messages are in the event log.
If you run the utility without the -deepCheck parameter
and the utility reports that the indexes are invalid, you do not haveto
rerun the utility with the -deepCheck parameter.
- -h
- Displays help for the utility.
This utility uses a significant amount of system
resources and might take a long time to run, depending on the size
of the text index.
Example
Example 1: Issue the
checknseindex command
to check the status of a valid text index:
C:\SQLLIB\bin\\checknseindex.exe -i IX335811 -p "C:\myTextIndexes\NODE0000"
CTE5265I The NSE index validation utility found the specified index, "IX335811",
to be valid.
Usage notes
- The Net Search Extender index validation utility is in the SQLLIB/bin directory.
To run the utility on Windows operating
systems, use checknseindex.exe. On AIX® operating systems, use checknseindex.
- Modify the following sample SQL statement to obtain the ID of
an index on your system:
select a.indexidentifier, indexdirectory
from db2ext.ttextcolumns a, db2ext.ttextindexes b
where a.indexidentifier = b.indexidentifier
and a.tablename = 'MYTAB'
and a.schemaname = 'MYSCHEMA' and a.columnname ='MYDATA'"
- For a partitioned environment, run the utility on all of the corresponding
nodes.