SYSPROC.SYSTS_START

You can enable DB2® text search functions by calling the SYSPROC.SYSTS_START stored procedure.

Text search functions include support for SQL queries that use the CONTAINS function, the SCORE function, and the administration stored procedures that are used to maintain text search indexes.

Run the SYSPROC.SYSTS_START stored procedure each time when a server is added or changed in QSYS2.SYSTEXTSERVERS table.

If text search functions are not started, the database returns SQLCODE -20424 with reason code 4 for the CONTAINS and SCORE functions. The SYSPROC.SYSTS_CREATE and SYSPROC.SYSTS_UPDATE administrative procedures also fail with SQLCODE -20424 if the server has not been started.

For the text search servers that are contained in the QSYS2.SYSTEXTSERVERS table, TCP/IP names are resolved. Multiple calls to the SYSPROC.SYSTS_START stored procedure are not considered an error. This process allows you to verify the address resolution in the QSYS2.SYSTEXTSERVERS table.

If the server is a local server, then this stored procedure call starts the server if it is not already started. If the server is a remote server, the procedure call verifies that the server is active, but does not actually start the server.

Prerequisites

Before you call the SYSPROC.SYSTS_START stored procedure, verify that the QSYS2.SYSTEXTSERVERS table contains at least one entry.

Authorization

The user ID under which this stored procedure is invoked must have the following privileges:
  • *EXECUTE authority on the procedure
  • SELECT and UPDATE privilege on the SYSTXTSRVR table.
  • *EXECUTE authority on the QSYS2 library of the SYSTXTSRVR file.
  • *JOBCTL authority or QIBM_DB_SQLADM security special function usage.

For information about the system authorities corresponding to SQL privileges, see GRANT (Table or View Privileges).

Syntax

Read syntax diagramSkip visual syntax diagramSYSPROC.SYSTS_START( serveridaliasname )

The schema qualifier is SYSPROC.

Parameter

serverid or aliasname
Specifies the identifier of the server to be started. A serverid or server aliasname is a string. If no identifier is provided, the default is to start all servers. The identifier string must either be a valid serverid that exists in the SERVERID column, or a valid server aliasname that exists in the ALIASNAME column of the QSYS2.SYSTEXTSERVERS table. If the identifier can be converted to an integer value, it is interpreted as a serverid. If the identifier cannot be converted to an integer value, it is interpreted as a server aliasname.

The data type of this parameter is VARCHAR(128).

Note: Only the servers that are identified as production servers are started if no value is specified for serverid or aliasname. Production servers are identified by the parameter SERVERCLASS = 0 in the QSYS2.SYSTEXTSERVERS table. Any test servers must be started by specifying the serverid or aliasname that is associated with the test server.
To start all production servers:  
CALL SYSPROC.SYSTS_START().
To start a server with an ID of 1:  
CALL SYSPROC.SYSTS_START(1)
To start a server with an alias name of "LOCAL_SERVER":  
CALL SYSPROC.SYSTS_START('LOCAL_SERVER')
To start a server with an alias name of "local_server":  
CALL SYSPROC.SYSTS_START('"local_server"')