2017-08-24 45 views
0

我有一個FTC,包括5個表格的5個全文索引。 我需要使用T-SQL腳本將這些表中的PK和FKs:id INT轉換爲id BIGINT。 當然,服務器需要使用這些ID刪除表格的FTI。 如何在腳本開始時編寫FTI腳本,然後進行轉換並在腳本末尾完全恢復FTC中的相同FTI?如何編寫全文目錄?

回答

1

這個怎麼樣(注意:這僅僅是FTI的一部分,我相信你已經有列類型轉換腳本):

alter fulltext index on table1 disable 
-- below line is optional 
alter fulltext index on table1 drop ([any_fti_column_you_need_to_change]) 
-- convert your columns from INT to BIGINT, note with PKs it may not be that simple 
alter fulltext index on table1 
    add ([any_column_you_dropped_and_changed_which_was_a_part_of_fti]) 
alter fulltext index on table1 enable 

HTH

相關問題