IBM Books
(C) IBM Corp. 2000

DB2 Net Search Extender Administration and User's Guide

Creating a text index on a nickname with incremental index update using DB2 Replication

Before creating a text index on a nickname using a replication capture table, you must perform the following steps:

Note

The following steps only provide an overview of the process and are not an example.

  1. Set up the DB2 federated database with all server definitions and wrapper definitions.
  2. Set up the replication control tables and the capture programs at the remote server. This is where the source table for the nickname resides. See Chapter 2, "Setting up for Replication" in the DB2 Replication Guide and Reference, Version 8. If DB2 does not automatically create nicknames, you must create nicknames in the federated DB2 database using one schema name for the following tables:

    After this step, nicknames for the replication control tables are available as nicknames under one "capture control schema" on the federated DB2 database. This schema name is important for the DB2TEXT CREATE INDEX command.

  3. Register the table as a replication source. For details, see Chapter 3, "Registering tables and views as replication sources" in the DB2 Replication Guide and Reference, Version 8. For restrictions on registering the nickname the index is to be created on, see page ***.
  4. If DB2 does not automatically create a nickname in the registration step, create a nickname for the replication capture table in the federated database. The replication capture table can either be a Change Data (CD) table or a Consistent Change Data (CCD) table. This nickname is a parameter for the DB2TEXT CREATE INDEX command.

    Note that the column names IBMSNAP_OPERATION, IBMSNAP_COMMITSEQ, IBMSNAP_INTENTSEQ, and the names of the primary key columns must not be changed.

  5. If you are using DB2 replication source, ensure that your capture program is running. We strongly recommend not to use a cold start for the capture program. If a cold start is used, all rows in the IBMSNAP_SIGNAL table for APPLY_QUAL LIKE 'NSE%' have to be reinserted. In the following SQL statement you can see how this is done:
    INSERT INTO <capture control schema>.IBMSNAP_SIGNAL
    SELECT CURRENT TIMESTAMP, 'CMD', 'CAPSTART', MAP_ID, 'P' 
    FROM <capture control schema>.IBMSNAP_PRUNCNTL
    WHERE APPLY_QUAL LIKE 'NSE%';
    
  6. You can use the following example to create a text index on a nickname using replication:
    DB2TEXT
    CREATE INDEX <indexname> FOR TEXT ON <nickname> (< text column>)
    REPLICATION CAPTURE TABLE <capture nickname>
    CONTROL TABLE SCHEMA <capture control schema>
    


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]