21

こんにちは、SQL Server 2008 を使用して、データベース内のすべてのテーブルと列の全文索引を検索できるクエリを探しています。このために提供できる情報やヘルプを歓迎します。

4

3 に答える 3

40

入手方法は次のとおりです

SELECT 
    t.name AS ObjectName, 
    c.name AS FTCatalogName ,
    i.name AS UniqueIdxName,
    cl.name AS ColumnName
FROM 
    sys.objects 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.indexes i
ON 
        fi.unique_index_id = i.index_id
    AND fi.[object_id] = i.[object_id];
于 2013-12-09T19:53:24.990 に答える
11
select distinct
    object_name(fic.[object_id])as table_name,
    [name]
from
    sys.fulltext_index_columns fic
    inner join sys.columns c
        on c.[object_id] = fic.[object_id]
        and c.[column_id] = fic.[column_id]
于 2013-05-16T14:56:09.623 に答える