You can delete orphaned collections with the db2ts CLEANUP FOR TEXT command or use the following process to identify and remove orphaned collections by using the administration tool.
A text search index is associated with a single collection for non-partitioned or single-partition databases, and with n collections for multi-partition databases with n the number of relevant data partitions. Although db2ts commands and procedures operate on text search indexes, the text search tools operate on the text search collections. When a text search index no longer exists but its corresponding text search collection does, it is called an orphaned collection.
A collection may also get an orphaned or an invalid status in some failure scenarios. For example, a disk crash may cause an inconsistency in the text index metadata.
adminTool status -configPath <absolute-path-to-configuration-folder>
SELECT collectionname FROM SYSIBMTS.TSCOLLECTIONNAMES
Perform
this query on all the databases enabled for DB2® Text Search,
and combine the results into a list.The administration tool lists all text search collections, while the query on the SYSIBMTS.TSCOLLECTIONNAMES view lists only text search indexes on the current database.
adminTool delete -configPath <absolute-path-to-configuration-folder>
-collectionName collection-name
adminTool.sh status -configPath $HOME/sqllib/db2tss/config
CollectionName IndexSize NumOfDocuments
Default 13,159B 0
tigertail_DBCP1208_TS542717_0000 13,159B 11
tigertail_DBCP1208_TS012817_0000 13,159B 17
tigertail_DBCP1208_TS082817_0000 13,159B 16
tigertail_DBCP1208_TS152817_0000 13,159B 18
tigertail_DBCP1208_TS212817_0000 13,159B 16
tigertail_DBCP1208_TS302817_0000 13,159B 17
tigertail_DBCP1208_TS392817_0000 13,159B 10
tigertail_DBCP1208_TS462817_0000 13,159B 10
tigertail_DBCP1208_TS542817_0000 13,159B 12
tigertail_DBCP1208_TS022917_0000 13,159B 10
tigertail_DBCP1208_TS112917_0000 13,159B 16
tigertail_DBCP1208_TS192917_0000 13,159B 11
tigertail_DBCP1208_TS262917_0000 13,159B 12
tigertail_DBCP1208_TS867530_0000 13,159B 16
db2 select collectionname from sysibmts.tscollectionnames
COLLECTIONNAME
--------------------------------------------------------------------
tigertail_DBCP1208_TS542717_0000
tigertail_DBCP1208_TS012817_0000
tigertail_DBCP1208_TS082817_0000
tigertail_DBCP1208_TS152817_0000
tigertail_DBCP1208_TS212817_0000
tigertail_DBCP1208_TS302817_0000
tigertail_DBCP1208_TS392817_0000
tigertail_DBCP1208_TS462817_0000
tigertail_DBCP1208_TS542817_0000
tigertail_DBCP1208_TS022917_0000
tigertail_DBCP1208_TS112917_0000
tigertail_DBCP1208_TS192917_0000
tigertail_DBCP1208_TS262917_0000
13 record(s) selected.
Comparing the two outputs, you
see that the text search collection tigertail_DBCP1208_TS867530_0000
does not have a corresponding text search index. Use the administration
tool to delete that orphaned collection: adminTool.sh delete -configPath $HOME/sqllib/db2tss/config
-collectionName tigertail_DBCP1208_TS867530_0000