Edu*_*eni 15 t-sql full-text-search sql-server-2008
我正在重构旧数据库并删除不再使用的列.DB曾经有全文索引,因此,某些列标记为全文.
我该如何删除它们?
笔记:
编辑:
我试过了
ALTER FULLTEXT INDEX ON tableName DROP (ColumnName)
Run Code Online (Sandbox Code Playgroud)
但得到这个错误:
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.
Run Code Online (Sandbox Code Playgroud)
Edu*_*eni 32
自己找到解决方案:
-- 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
Run Code Online (Sandbox Code Playgroud)
我知道这是一个老帖子,我被困了,我不得不改变表中的列而不是drop.below代码对我有用...
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'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8788 次 |
| 最近记录: |