Creating text indexes for searching the Sametime Advanced Server database

Creating text indexes is a requirement for making content in the IBM® Sametime® Advanced database searchable.

Before you begin

You must have installed the IBM DB2® server software and DB2 Net Search Extender, then started those applications, and created a database.
Restriction: The version of the Net Search Extender must exactly match the version of the DB2 server, including fix pack levels. See the DB2 help topic Upgrading to DB2 Net Search Extender for information on using it with your installed version of DB2.

About this task

Use the dbtext.bat and dbtext.sh files provided with the Sametime Advanced Server to run the Net Search Extender services. If the indexes ever become corrupted, you can safely rerun the dbtext scripts at any time without losing any existing data.

Procedure

  1. Use the IBM Support download documents to determine which installation packages you need to download.
  2. Download the appropriate package.
  3. Download the appropriate version of the dbtext script for your operating system to the DB2 server.

    The scripts are stored in the STAdvancedLaunchpad\disk1\DatabaseScripts directory within the Sametime software download.

  4. With the DB2 command window open, start Net Search Extender by running the following command.

    db2text start

    DB2 Net Search Extender must be running to support Sametime Advanced operations. If you stop this service for any reason, be sure to restart it. To remove the need for manual restarts, you may want to set this service to start automatically:
    • Linux™: Add the text indexing service startup to the database startup script.
    • Windows™: Set the "DB2TEXT" service to "Automatic" in the Windows Services control panel.
  5. Run the following command to create the text indexes:

    Linux

    ./dbtext.sh database_name

    Windows

    dbtext.bat database_name

    Replace database_name with the name of the Advanced database; for example, STADV.

  6. After the script successfully completes, you can disconnect from the database with the following command:

    DB2 DISCONNECT STADV

  7. Now type the following command in the DB2 Command Window:

    EXIT

  8. Close the DB2 Command Window.

What to do next

If the dbtext.sh script does not successfully enable text searching for Linux, perform the following workaround to enable text searching:

  1. In a DB2 command window, change to the sqllib/adm directory:

    cd ~/sqllib/adm

  2. Run the following command:

    ls -al .fenced

  3. Run the dbtext.sh script.

If the group of .fenced differs from the primary group of the database instance, follow these steps to correct the ownership:

  1. In a DB2 command window, enter this command to stop the db2text service:

    db2text stop

  2. Stop DB2:

    db2stop

  3. Change to the sqllib/adm directory:

    cd ~/sqllib/adm

  4. Enter this command:

    rm .fenced

  5. Enter this command to correct the ownership:

    touch .fenced

  6. Start DB2:

    db2start

  7. Start the db2text service:

    db2text start

  8. Run the dbtext.sh script again.