Enabling a database for Db2 Text Search
You must enable each database that contains columns of text to be searched. You can enable a database forDb2 Text Search by using the db2ts ENABLE DATABASE FOR TEXT command or the SYSPROC.SYSTS_ENABLE stored procedure.
Before you begin
The authorization ID of the statement must hold the SYSTS_ADM role and DBADM authority.
About this task
- SYSIBMTS.TSDEFAULTS
- Shows the database default values for index, text, and processing characteristics
- SYSIBMTS.TSLOCKS
- Shows information about command locks set at the database and index level
- SYSIBMTS.TSINDEXES
- Shows all text search indexes and their settings
- SYSIBMTS.TSCONFIGURATION
- Shows the index configuration parameters
- SYSIBMTS.TSCOLLECTIONNAMES
- Shows the collection names for each index
- SYSIBMTS.TSSERVERS
- Shows the Text Search server connection information
After you enable a database for text search, it remains enabled until you explicitly disable it.
- Enter the following command:
db2ts "ENABLE DATABASE FOR TEXT CONNECT TO databaseName"The enable operation attempts to populate the connection information for the text search server in the SYSIBMTS.TSSERVERS administrative view. However, the information might be incomplete or insufficient. After the command completes either successfully or with a warning for incomplete enablement, review the values in SYSIBMTS.TSSERVERS view and update as necessary.
You must do this step only once for each database. You do not have to enable a database each time that you stop and restart the instance services.
For example, to enable a database named SAMPLE, enter the following command:db2ts "ENABLE DATABASE FOR TEXT CONNECT TO SAMPLE" - Call one of the administrative SQL routines, as follows:
CALL SYSPROC.SYSTS_ADMIN_CMD ('ENABLE DATABASE FOR TEXT','en_US', ?)CALL SYSPROC.SYSTS_ENABLE('en_US', ?)