SQL server fulltext indexes in SQL Server 2008?

651    Asked by behail_3566 in SQL Server , Asked on Jul 19, 2021

How do I find a list of tables that have a FULLTEXT INDEX applied to them on a given database? For example, you can enable and disable a FULLTEXT INDEX like this: ALTER FULLTEXT INDEX ON [dbo].[OBJECT_FACT] ENABLE ALTER FULLTEXT INDEX ON [dbo].[OBJECT_FACT] DISABLE What is sql server full text index?

Answered by Ankit Chauhan

SQL Server full-text index: A full-text index is a special type of index that provides index access for full-text queries against character or binary column data. A full-text index breaks the column into tokens and these tokens make up the index data.

To find a list of tables that have a FULLTEXT INDEX:

SELECT SCHEMA_NAME(t.schema_id) AS SchemaName, t.name AS TableName, c.name AS FTCatalogName , f.name AS FileGroupName, i.name AS UniqueIdxName, cl.name AS ColumnName FROM sys.tables t INNER JOIN sys.fulltext_indexes fi ON t.[object_id] = fi.[object_id] INNER JOIN sys.fulltext_index_columns ic ON ic.[object_id] = t.[object_id] INNER JOIN sys.columns cl ON ic.column_id = cl.column_id AND ic.[object_id] = cl.[object_id] INNER JOIN sys.fulltext_catalogs c ON fi.fulltext_catalog_id = c.fulltext_catalog_id INNER JOIN sys.filegroups f ON fi.data_space_id = f.data_space_id INNER JOIN sys.indexes i ON fi.unique_index_id = i.index_id AND fi.[object_id] = i.[object_id];
To enable and disable a FULLTEXT INDEX refer msdn
sp_fulltext_table [ @tabname= ] 'qualified_table_name' , [ @action= ] 'action' [ , [ @ftcat= ] 'fulltext_catalog_name' , [ @keyname= ] 'unique_index_name' ]

The preferred method is to use ALTER FULLTEXT INDEX [myFTindex] {ENABLE/DISABLE} instead of the deprecated sp_fulltext_table.



Your Answer

Interviews

Parent Categories