Reputation: 6500
I have a FTC including 5 Full-Text indexes for 5 tables. I need to convert a PKs and FKs: id INT to id BIGINT in these tables using a T-SQL script. Naturally, server requires to drop the FTI of tables with these ids. How to script the FTIs at the start of script, then do conversion and to restore exactly the same FTIs in FTC at the end of script?
Upvotes: 0
Views: 473
Reputation: 2173
How about this (note this is only FTI part, I trust you already have the column type conversion script):
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
Upvotes: 1