Documentation
(C) IBM Corp. 1996, 1999

Text Extender: Administration and Programming


Getting useful information

This section describes the administration commands for displaying information about:

Displaying enabled-status information

Summary

When
When you need information about the enabled status of databases, tables, text columns or external files.

Command
GET STATUS

Authorization
None

Enter:

     db2tx "GET STATUS"

Here is an example of the output displayed by GET STATUS. It shows the enabled status of the database, and of any enabled tables, text columns, or text files that it contains.

     Database is enabled for Text Extender
 
       Table DB2TX.MYTABLE is enabled as a common-index table
 
       Table DB2TX.SAMPLE is enabled as a common-index table
          TextColumnName     HandleColumnName
          --------------     ----------------
          COMMENT            COMMENTHANDLE
 
 
       Table DB2TX.TEST is enabled as a multi-index table
          TextColumnName     HandleColumnName
          --------------     ----------------
          ABSTRACT1          ABSTRACT1HANDLE
          ABSTRACT2          ABSTRACT2HANDLE

Displaying the settings of the environment variables

Summary

When
When you need information about the settings of the environment variables.

Command
GET ENVIRONMENT

Authorization
None

Enter:

     db2tx "GET ENVIRONMENT"

Here is an example of the output displayed by GET ENVIRONMENT. It shows the current settings of the Text Extender environment variables.

 Current database manager instance  (DB2INSTANCE) = db2
 Default database name                 (DB2DBDFT) = my_database
 Instance name                  (DB2TX_INSTOWNER) = user1
 Instance directory      (DB2TX_INSTOWNERHOMEDIR) = /usr/instance1

Displaying the text configuration settings

Summary

When
When you need the default settings for text, index, and process information.

Command
GET TEXT CONFIGURATION

Authorization
None

These settings are described in Text configuration settings. To change them, see Changing the text configuration.

To display the text configuration, enter:

     db2tx "GET TEXT CFG"

Here is an example of the output displayed by GET TEXT CONFIGURATION. It shows the current text configuration settings.

  Coded character set ID     (CCSID) = 850
  Language                (LANGUAGE) = US_ENGLISH
  Format                    (FORMAT) = TDS
 
  Index type             (INDEXTYPE) = LINGUISTIC
  Update frequency      (UPDATEFREQ) = NONE
  Index directory        (DIRECTORY) = user1/db2tx/indexes
 
  Update index option  (UPDATEINDEX) = UPDATE
  Commit count         (COMMITCOUNT) = 10 000
  Tablespace name      (TABLESPACE) = TXLOG
 

Displaying the status of an index

Summary

When
When you need to determine whether an index can be searched or updated.

Command
GET INDEX STATUS

Authorization
None

Some situations can occur that prevent you from searching in an index, or from updating it. In such situations, messages are stored in the index's log table that can help you determine the cause. So it can be useful to check the status of an index, and whether there are any messages available.

This example displays the index status for the index of a common-index table:

     db2tx "GET INDEX STATUS db2tx.sample"

The syntax lets you display the index status for a particular text column. This example gets the index status for the index of a multi-index table column:

     db2tx "GET INDEX STATUS db2tx.sample HANDLE commenthandle"

Here is an example of the output displayed by GET INDEX STATUS.

 Node 1
 Search status             = Search available
 Update status             = Update available
 Reorg status              = started 13.55
 Scheduled documents       = 0
 Indexed documents         = 187000
 Primary index documents   = 130000
 Secondary index documents =  57000
 Error events              = No error events

If the index is split among several nodes, the node information is displayed per node.

Search status
Indicates whether you can use the specified handle column to search in the index. If search is not available, check the indicated reason code for more information about why the situation occurred, and then use RESET INDEX STATUS to be able to work with the index again. See Chapter 16, Error event reason codes.

Update status
Indicates whether you can update the index for the specified table or column. If the index update function is not available, check the indicated reason code for more information about why the situation occurred, and then use RESET INDEX STATUS to be able to work with the index again.

Reorg status
Indicates whether you can reorganize the index for the specified table or column. If the reorganize function is not available, check the indicated reason code for more information about why the situation occurred. A common reason for reorganization not being available is because the index is currently being updated.

Scheduled documents
Shows the number of documents that are listed in the queue for indexing (or for deleting from the index).

Indexed documents
Shows the number of documents that have already been indexed from the queue of scheduled documents.

Primary index documents
Shows the number of documents in the primary index.

Secondary index documents
Shows the number of documents in the secondary index.

Error events
Shows the number of events that are available in the index's log table. You can display this information as described in Displaying error events. When you no longer need this information, you can delete it as described in Deleting index events.

Displaying error events

When problems occur during indexing, such as a document scheduled for indexing could not be found, these so-called error events are written to the index's log table.

The event return codes are described in Chapter 16, Error event reason codes.

You can access the error events in a view of the log table called db2tx.LOGIXnnnnnn, where IXnnnnnn is the name of the index, obtainable from the catalog view.

To get the name of the index:

     DB2 SELECT TABLENAME,
                HANDLENAME,
                INDEXNAME
         FROM   DB2TX.TEXTCOLUMNS

The error event view has the following layout:

          UPDATESTATUS   SMALLINT
          EVENTREASON    INTEGER
          EVENTMESSAGE   VARCHAR(1024)
          UPDATETIME     TIMESTAMP
          HANDLE         DB2TEXTH or DB2TEXTFH
          NODENUMBER     INTEGER

Here is an example showing how to access the information from the index log:

     DB2 SELECT EVENTREASON,
                EVENTMESSAGE,
                UPDATETIME,
                HANDLE
         FROM   DB2TX.LOGIXNNNNNN

Displaying the index settings

Summary

When
When you need information about the settings of an index.

Command
GET INDEX SETTINGS

Authorization
None

This example gets the index settings for the index of a common-index table:

     db2tx "GET INDEX SETTINGS db2tx.sample"

This example gets the index settings for the index of a multi-index table column:

     db2tx "GET INDEX SETTINGS db2tx.sample
                      HANDLE   commenthandle"

If the table is enabled as a multi-index table, this command displays the index settings of all enabled text columns in the table.

Here is an example of the output displayed by GET INDEX SETTINGS for a common-index table. The output for a multi-index table shows similar information for each index. The syntax lets you request the index settings for a particular text column.

       Current index settings:
 
            Index type            (INDEXTYPE)   = LINGUISTIC
            Update index option   (UPDATEINDEX) = UPDATE
            Update frequency      (UPDATEFREQ)  = NONE
            Node 1
            Index directory       (DIRECTORY)   = /home/user1/db2tx/indices
 

If the index is split among several nodes, the node information is displayed for the index directory.

Displaying the text settings for a column

Summary

When
When you need information about the text settings for a column.

Command
GET TEXT INFO

Authorization
None

This example gets the text information for the index of a common-index table:

     db2tx "GET TEXT INFO db2tx.sample"

This example gets the text information for the index of a multi-index table column:

     db2tx "GET TEXT INFO db2tx.sample HANDLE commenthandle"

The syntax lets you specify a table name and the name of a handle column.

If you specify only a table name in the command, the text information for each enabled column in this table is displayed. If you also specify a handle column name, only the text information for that column is displayed.

Here is an example of what is displayed by this command for a multi-index table:

              Text information for column ABSTRACT1
                     with handle column ABSTRACT1HANDLE:
              Coded character set ID  (CCSID) = 850
              Language             (LANGUAGE) = US_ENGLISH
              Format                 (FORMAT) = TDS
 
            Text information for column ABSTRACT2
                     with handle column ABSTRACT2HANDLE:
              Coded character set ID  (CCSID) = 850
              Language             (LANGUAGE) = US_ENGLISH
              Format                 (FORMAT) = TDS


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]