DB2 Version 9.7 for Linux, UNIX, and Windows

db2ts ENABLE DATABASE FOR TEXT command

The ENABLE DATABASE FOR TEXT command enables DB2® Text Search for the current database. This command must be issued successfully before you can create text search indexes on columns in tables within the database.

For execution, the command needs to be prefixed with db2ts at the command line.

Authorization

The user must have DBADM privilege to execute the ENABLE DATABASE command.

Prerequisite

Instance owner must hold DBADM with DATAACCESS authority. The SYSADM no longer holds SECADM nor DBADM privilege in Version 9.7. SECADM must explicitly grant DBADM with DATAACCESS authority to instance owner before running the ENABLE DATABASE command.

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-ENABLE DATABASE FOR TEXT------------------------------------->

>--+---------------------------------------+-------------------><
   '-| AUTOGRANT |--| connection options |-'   

connection options

|--+----------------------------------------------------------------+--|
   '-CONNECT TO--database-name--+---------------------------------+-'   
                                '-USER--username--USING--password-'     

Command parameters

CONNECT TO database-name
This clause specifies the database to which a connection is established. The database must be on the local system. If specified, this clause takes precedence over the environment variable DB2DBDFT. This clause can be omitted if the following are all true:
  • The DB2DBDFT environment variable is set to a valid database name.
  • The user running the command has the required authorization to connect to the database server.
USER username USING password
This clause specifies the authorization name and password used to establish the connection.
AUTOGRANT
If this option is specified, an attempt is made to grant DBADM with DATAACCESS privileges to the instance owner, in case the instance owner misses these privileges for this database. For a successful grant of privileges, the user must have SECADM privilege for the database and cannot be the instance owner (a user cannot grant privileges to herself/himself).

Usage notes

When executed successfully, this command:
  • Enables the DB2 Text Search feature for the database.
  • Establishes DB2 Text Search database configuration default values in the view SYSIBMTS.TSDEFAULTS.
  • Creates the following DB2 Text Search administrative views in the SYSIBMTS schema:
    • SYSIBMTS.TSDEFAULTS
    • SYSIBMTS.TSLOCKS
    • SYSIBMTS.TSINDEXES
    • SYSIBMTS.TSCONFIGURATION
    • SYSIBMTS.TSCOLLECTIONNAMES

    The tables are created in the default table space (IBMDEFAULTGROUP) of the database.

Changes to the file system on the DB2 server: None.