Configuring HADR for Db2 Text Search

Configure HADR for Db2® Text Search to ensure that everything can be restored in the event of a database failover.

Before you begin

Users must complete the steps in the Step by Step Procedure to set up HADR replication between DB2 databases before they can continue with the following steps.

About this task

Db2 Text Search indexes in a database failover scenario using a shared disk for text search indexes.
Note: Db2 Text Search should not be configured on the standby.

Procedure

  1. Configure Db2 Text Search on the primary database, then enable the database for Db2 Text Search.
  2. Ensure that Db2 Text Search is stopped.
  3. Configure the defaultDataDirectory parameter to a common location. The collections folder should point to the common directory pointing to the same path accessible by both systems. For example:
    configTool configureParams -defaultDataDirectory /<path-to-shared-disk-space>/
  4. Db2 Text Search index collections can be created in a custom location. The location can be on a shared disk that is accessible from the primary server as well as the standby server. The file system must be set up identically for primary and standby systems to be able to access the collections with the same absolute path information.
  5. Copy the db2tss folder from the primary to the standby. Move the sqllib/db2tss folder that was originally on the standby to somewhere else (as it is not required) and copy the db2tss folder from primary to the standby under sqllib.
  6. If a failover happens, ensure that Db2 Text Search is stopped on the primary server before starting it on standby. To start the text search on standby run:
    db2ts start for text
    Note: Rolling upgrade is not supported with upgrading HADR with Db2 Text Search at this time.

About this task

Additional care is needed when having Db2 Text Search indexes on a shared disk.

Depending on the reason for the database failover on the primary database, the text search server process on the primary database might still be active. If that is the case, make sure to shut down the text search server on the primary database, before a startup of the text search server on the standby database. The advantage of this setup is that it requires only space for one set of text search indexes, and has a fast uptime, because the text search server on the standby database will have immediate access to the collections after it is started.

Procedure

  1. To resume full-text search on the failover system, refresh the text search server configuration.
  2. Identify and treat interrupted text search administrative operations, if there are any.
  3. Start the text search server.