我正在重构旧数据库并删除不再使用的列。 DB曾经有全文索引,因此,某些列标记为全文。
如何删除它们?
注意:
修改
我试过了
ALTER FULLTEXT INDEX ON tableName DROP (ColumnName)
但是得到了这个错误:
Full-text crawl manager has not been initialized. Any crawl started before
the crawl manager was fully initialized will need to be restarted. Please
restart SQL Server and retry the command. You should also check the error
log to fix any failures that might have caused the crawl manager to fail.
答案 0 :(得分:30)
自己找到解决方案:
-- You should call the DISABLE command
ALTER FULLTEXT INDEX ON TableName DISABLE
ALTER FULLTEXT INDEX ON TableName DROP (ColumnName)
ALTER TABLE TableName DROP COLUMN ColumnName
答案 1 :(得分:8)
我知道这是一个老帖子,我被困住了,我不得不改变表中的一列而不是下降。下面的代码对我有效...
EXEC sp_fulltext_column //Drop your column from full text search here
@tabname = '<table_name>' ,
@colname = '<column_name>' ,
@action = 'drop'
ALTER TABLE ... //Alter your column here
EXEC sp_fulltext_column //Add your column back to full text search
@tabname = '<table_name>' ,
@colname = '<column_name>' ,
@action = 'add'