DB2 Version 10.1 for Linux, UNIX, and Windows

SYSTS_CONFIGURE procedure - Configure current database for text search

The SYSTS_CONFIGURE procedure applies text search server connection information to the text search catalog.

Certain text search server properties have to be reflected in the text search administration tables (text search catalog). These properties are associated with a text index when the index is created. When parameters such as the token are updated periodically, the change has to be reflected in the database and the properties for all the indexes have to be updated as well.

This procedure is required initially for:
  • Incomplete enablement
  • Stand-alone text search server setups
  • Partitioned databases
  • and further on, following any updates to text search server connection information
For subsequent updates, ensure that no text search administrative operation is active and shut down the currently configured text search server.

During database enablement the SYSIBMTS.TSSERVER administrative view is updated with connection information for the integrated text search server. Review and update the text server information in the SYSIBMTS.TSSERVER view with the relevant text search server data and run the SYSTS_CONFIGURE procedure to apply the updated information. For multiple databases in the instance, configure each database with the information for the same text search server.

Generally the sequence of operations is as follows:
  1. Configure a text search server. Integrated text search servers can be configured during installation or when a DB2® instance is created. A stand-alone text search server is configured separately.
  2. Enable a database for text search by using the db2ts ENABLE command, or the SYSTS_ENABLE or SYSTS_ADMIN_CMD procedures with the ENABLE option.
  3. Determine parameters for the text search server as needed for the SYSIBMTS.TSSERVERS view.
  4. Update the SYSIBMTS.TSSERVERS administrative view with the parameters for the text search server.
    • If the view is empty then use an INSERT statement. For example:
      INSERT INTO SYSIBMTS.TSSERVERS (HOST, PORT, TOKEN, SERVERSTATUS) 
      VALUES ('localhost', 55000, '9kfsjg48=', 0); 
    • If the view already contains a row then use a SQL UPDATE statement. For example:
      UPDATE SYSIBMTS.TSSERVERS SET (HOST, PORT, TOKEN) = 
      ('tsmach1.ibm.com', 55002, 'k3j4fjk9u=')
  5. Execute the SYSTS_CONFIGURE procedure.

Authorization

The privileges held by the authorization ID of the statement must include the SYSTS_ADM role.

Default PUBLIC privilege

None

Syntax

Read syntax diagramSkip visual syntax diagram
>>-SYSTS_CONFIGURE--(--options--,--message-locale--,--message--)-><

The schema is SYSPROC.

Procedure parameter

options
An input argument of type VARCHAR(32K) that specifies the options to be used. If no options are needed, the argument can be null or an empty string.
message-locale
An input argument of type VARCHAR(33) that specifies the locale to be used for any returned error message. If the argument is null, an empty string or the message files for the specified locale are not available on the server, en_US is used.
message
An output argument of type VARCHAR(32K) that specifies a warning or informational message for an operation that is considered successful.

Example

Example 1: Prepare a database for text search services and return any messages in English.
CALL SYSTS_ENABLE('', 'en_US', ?)"

INSERT INTO SYSIBMTS.TSSERVERS                         
 (HOST,PORT,TOKEN,KEY,LOCALE,SERVERTYPE,SERVERSTATUS)   
  VALUES ('tsmach1.ibm.com', 55000, '9kfsjg48=', 'en_US', 0);  
                     
CALL SYSPROC.SYSTS_CONFIGURE('', 'en_US', ?) 
An example of output from this query:
Value of output parameters 
-------------------------- 
Parameter Name  : MESSAGE 
Parameter Value : Operation completed successfully. 
  
Return Status = 0

Usage notes