2017-08-24 47 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

相关问题