DB2 Version 10.1 for Linux, UNIX, and Windows

SYSTS_UPGRADE_INDEX - Upgrade text search indexes

This procedure updates DB2® Text Search index information in DB2 catalog tables and text search catalog tables.

Text search index collections are managed by the Text Search server. See Upgrading DB2 Text Search for more information.

Authorization

The privileges held by the authorization ID of the procedure must include the SYSTS_ADM role and the DBADM authority.

Default PUBLIC privilege

None

Syntax

Read syntax diagramSkip visual syntax diagram
>>-SYSTS_UPGRADE_INDEX--(--message_locale--,--message--)-------><

The schema is SYSPROC.

Procedure parameters

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.

Example

Example 1: In the following example, the database was enabled for text search in an older release and the procedure SYSTS_UPGRADE_CATALOG has already been completed successfully. The procedure SYSTS_UPGRADE_INDEX will complete the upgrade for the text index metadata in the database catalog. When the procedure succeeds, the output parameter message indicative of the successful operation is returned to the caller.
CALL SYSPROC.SYSTS_UPGRADE_INDEX('en_US', ?)
Parameter Name  : MESSAGE
Parameter Value  : CIE00001 Operation completed successfully. 

Return Status = 0  	
Example 2: In the following example, the database was not enabled for text search in the older release of the product. If a NULL value is set for message_locale, it means the system locale will be used. If the system locale is not available then the default locale 'en_US' will be used.
CALL SYSPROC.SYSTS_UPGRADE_INDEX('', ?)
SQL20427N  An error occurred during a text search administration procedure 
or command. The error message is "CIE0323E Specified or default database 
not enabled for text. ". 
SQLSTATE=38H14 	
Example 3: In the following example, the DB2 Text Search catalog and the text search indexes were already upgraded to the current version.
CALL SYSPROC.SYSTS_UPGRADE_INDEX('en_US', ?)
Value of output parameters
--------------------------
Parameter Name  : MESSAGE
Parameter Value  : CIE0002I The DB2 Text Search release level is current for 
the database. The system has not been upgraded. 

Return Status = 0
Example 4: In the following example, the DB2 Text Search catalog was not upgraded.
CALL SYSPROC.SYSTS_UPGRADE_INDEX('en_US', ?)
CIE0409E The DB2 Text Search catalog has not been upgraded to the current version.

Usage notes