SYSPROC.SYSTS_STOP

You can call the SYSPROC.SYSTS_STOP stored procedure to stop DB2® text search functions. This stored procedure sets the SERVERSTATUS value in the catalog QSYS2.SYSTEXTSERVERS to 1 (stopped).

After this stored procedure has completed, SQL queries that use the CONTAINS or SCORE functions or administration stored procedures used for index maintenance return a failure without trying to contact a text search server.

Note: Administrative procedures and SQL queries using the CONTAINS or SCORE built-in functions that were running when SYSTS_STOP was invoked are allowed to complete.

Changes to the based-on table of the index continue to be logged, even when the server is stopped. However, scheduled updates of the index do not occur until SYSPROC.SYSTS_START has been invoked.

Authorization

The user ID under which this stored procedure is invoked must have the following privileges:
  • *EXECUTE authority on the procedure
  • SELECT and UPDATE privileges on the SYSTEXTSERVERS table.
  • *EXECUTE authority on the QSYS2 library of the SYSTEXTSERVERS 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 diagramSYSTS_STOP( serveridaliasname )

The schema qualifier is SYSPROC.

Parameter

serverid or aliasname
Specifies the identifier of the server to be stopped. A serverid or server aliasname is a string. If no identifier is provided, the default is to stop 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).

To stop all production servers:  
CALL SYSPROC.SYSTS_STOP().
To stop a server with an ID of 1:
CALL SYSPROC.SYSTS_STOP(1)
To stop a server with an alias name of "LOCAL_SERVER":  
CALL SYSPROC.SYSTS_STOP('LOCAL_SERVER')
To stop a server with an alias name of "local_server":  
CALL SYSPROC.SYSTS_STOP('"local_server"')