The procedure disables DB2® Text Search for the current database.
Once the Text Search feature has been disabled, text search
indexes and commands are no longer available for use with the database.
The procedure issues a DISABLE DATABASE FOR TEXT text search administration command on the database server.
Authorization
The privileges held by the authorization ID of the statement must
include the following authorities:
- DBADM with DATAACCESS authority.
- SYSTS_ADM role
Default PUBLIC privilege
None
Syntax
>>-SYSTS_DISABLE--(--options--,--message_locale--,--message--)-><
The schema is SYSPROC.
Procedure parameters
- options
- An input argument of type VARCHAR(128) that specifies the options
to be used when disabling the database. The argument can be set to
FORCE. When this value is specified, all indexes are dropped and the
Text Search feature is disabled by force. No text search indexes are
preserved and no error message or warning is returned. If the argument
is null or an empty string, an attempt is made to disable the Text
Search feature for the database.
- message_locale
- An input argument of type VARCHAR(33) that specifies the locale
to be used for any error message returned. If the argument is null
or 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 a successfully completed operation.
Examples
Example 1: In the following
example, Text Search is disabled for a database using the SYSTS_DISABLE
procedure. The FORCE option is specified to ensure that the feature
is disabled even if text search indexes still exist on tables in the
database. Error messages are specified to be returned in English.
The message output parameter is set to an informational
message string.
CALL SYSPROC.SYSTS_DISABLE('FORCE', 'en_US', ?)
The following output is an example of sample output from this query.
Value of output parameters
--------------------------
Parameter Name : MESSAGE
Parameter Value : Operation completed successfully.
Return Status = 0
Example 2: In the following example, Text
Search is disabled for a database with existing text search indexes
using the SYSTS_DISABLE procedure without specifying the FORCE option.
This results in an error message to the caller. It is preferable to
drop all existing text search indexes before disabling the Text
Search feature or alternatively to specify the FORCE option for the
options input parameter value.
CALL SYSPROC.SYSTS_DISABLE('', 'en_US', ?)
The following output is an example of sample output from this query.
SQL20427N An error occurred during a text search administration
procedure or command. The error message is "CIE00326 Text search
index active in specified or default database. ". SQLSTATE 38H14