Dropping a table or a database does not automatically drop the text search collections. Use the following steps to ensure all artifacts are removed before dropping a table or a database.
db2ts "DROP INDEX mytitleidx FOR TEXT"
db2ts "DROP INDEX myxmlidx FOR TEXT"
Here in the Technology Explorer, we drop the indexes using the administrative SQL routine. Note that database object name referenced in quotes is case sensitive.
CALL SYSTS_DROP('MYSCHEMA', 'MYTITLEIDX', 'en_US', ?);
CALL SYSTS_DROP('MYSCHEMA', 'MYXMLIDX' , 'en_US', ?);
db2ts "DISABLE DATABASE FOR TEXT"
Here in the Technology Explorer, we disable the database using the administrative SQL routine.
CALL SYSTS_DISABLE('', 'en_US', ?);
The preceding example uses the SYSTS_DISABLE
procedure without specifying any option. If any text indexes are not dropped before the database is disabled for text search, an error message will be raised. Optionally, you can use the FORCE
option to ensure that the feature is disabled even if text indexes still exist on tables in the database. The FORCE
option is used as follows.
CALL SYSTS_DISABLE('FORCE', 'en_US', ?);
Now, you can stop the text search service and drop the database as you wish. Issue the following commands outside of Technology Explorer.
db2ts "STOP FOR TEXT"
DB2 DROP DATABASE dbname