Populating the text search administration tables for Db2 for z/OS

As part of enabling text search support for Db2 for z/OS, you must populate the SYSIBMTS.SYSTEXTSERVERS administration table and the SYSIBMTS.SYSTEXTCONNECTINFO administration table.

About this task

The database administrator must populate the server information columns in the SYSIBMTS.SYSTEXTSERVERS table with information about where one or more text search servers are installed.

Then, the Db2 database administrator must populate the SYSIBMTS.SYSTEXTCONNECTINFO administration table with the Db2 for z/OS connection information. This connection information is needed so that a text search server can connect to the Db2 subsystem and maintain the persistent copy of the Db2 full-text indexes.

Procedure

To populate the SYSIBMTS.SYSTEXTSERVERS and SYSIBMTS.SYSTEXTCONNECTINFO tables:

Create and process the necessary SQL statements by using the information that you collected during installation of the text search server (the authentication token, the encryption key, the port number, and the IP name or address of the text search server).

Use the DDF DOMAIN and TCPPORT values of your Db2 subsystem or data sharing group for DB2HOSTNAME and DB2SERVICEPORT. For the Db2 user ID (DB2UID), you can use any ID that is allowed to connect to Db2 for z/OS. This ID is used by the text search server to update full-text indexes in Db2. When you run the user-defined function SYSFUN.SYSTS_ENCRYPT, only the encrypted password is stored in Db2.

Tip: Start of changeIf you installed the text search server by deploying the Docker image, use the authentication token and encryption key that were returned with the IQQG0337I message. For more information, see Deploying IBM Text Search for Db2 for z/OS as Docker images.End of change

Example

You can use the following sample SQL INSERT statement to populate the tables:

//*********************************************************************
//* THE FOLLOWING EXAMPLE SQL STATEMENTS ARE FOR:                          
//* - REGISTERING INFORMATION ABOUT WHERE A TEXT SEARCH SERVER FOR DB2 
//*   FOR Z/OS IS INSTALLED                                            
//* - USING THE SYSFUN.SYSTS_ENCRYPT FUNCTION TO ENCRYPT A DB2 PASSWORD
//*   THAT THE TEXT SEARCH SERVER NEEDS TO CONNECT TO DB2              
//* - ADDING INFORMATION SO THAT A TEXT SEARCH SERVER CAN CONNECT TO   
//*   THE DB2 FOR Z/OS SUBSYSTEM                                       
//*********************************************************************
//*  //         DD  *                                                  
//*    INSERT INTO SYSIBMTS.SYSTEXTSERVERS                             
//*      (SERVERNAME,SERVERPORT,SERVERAUTHTOKEN,SERVERMASTERKEY)       
//*      VALUES('9.30.176.75',10000,'1aPgk6Q='                         
//*            ,'1aPgk6TkD/FVt8BuCyO8Bg==');                           
//*                                                                    
//*    UPDATE SYSIBMTS.SYSTEXTSERVERS SET DB2ENCRYPTEDPW =             
//*           SYSFUN.SYSTS_ENCRYPT('myDB2UIDpw',SERVERMASTERKEY);      
//*                                                                    
//*    INSERT INTO SYSIBMTS.SYSTEXTCONNECTINFO         
//*      (DB2HOSTNAME,DB2SERVICEPORT,DB2UID)           
//*      VALUES('db2host.svl.ibm.com','446','DB2UID'); 
//*      	

What to do next

Verify the text search installation. See Verifying the text search installation.