2011-03-30 29 views
1

好的,在創建全文目錄時出現問題。SQL Server 2005 FullText索引''IX_on_an_identity_col不是強制執行全文搜索鍵的有效索引...'

這是我創造我的獨特的非可空等指標與

CREATE UNIQUE NONCLUSTERED INDEX [IX_unique] ON [dbo].[my_table] 
(
    [my_identity_column] ASC 
) 
WITH (
    PAD_INDEX = OFF, 
    STATISTICS_NORECOMPUTE = OFF, 
    SORT_IN_TEMPDB = OFF, 
    IGNORE_DUP_KEY = OFF, 
    DROP_EXISTING = OFF, 
    ONLINE = OFF, 
    ALLOW_ROW_LOCKS = ON, 
    ALLOW_PAGE_LOCKS = ON, 
    FILLFACTOR = 90 
) ON [PRIMARY] 

它的上一個非空,標識列存儲整數創建列代碼。

運行這個失敗,那麼

EXEC sp_fulltext_table 
    @tabname='my_table', 
    @action='create', 
    @ftcat = 'my_catalog', 
    @keyname = 'IX_unique' 
GO 

有了這個消息

'IX_unique' is not a valid index to enforce a full-text search key. A full-text search key must be a unique, non-nullable, single-column index which is not offline, is not defined on a non-deterministic or imprecise nonpersisted computed column, and has maximum size of 900 bytes. Choose another index for the full-text key. 

任何人都得到了線索?我已經google了一下,但人們似乎在做的主要錯誤是使用列名而不是索引名。

感謝, 羅賓

回答

1

== ==解決

衛生署

你不能看到它的上面,我整理了一下我的SQL擺脫特定的表名,同時我也解決了這個問題。索引創建時的名稱與我在創建全文索引時嘗試引用的索引名稱略有不同。從SQL Server的實際問題的一些跡象會很好,但我想現在我沒有好位置批評別人的工作。

猜測我會留下這個證明我的白癡,所以其他人也許可以從中學習。