Error: Cannot alter or drop column 'x' because it is enabled for Full-Text Search

11,308

Solution 1

Found the solution myself:

-- 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

Solution 2

I know this is an old post,I got stuck up,where i had to alter a column in table rather than drop.below code worked for me...

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' 
Share:
11,308
Eduardo Molteni
Author by

Eduardo Molteni

I'm a software developer working in San Antonio de Areco, Argentina, where I have my small software development studio.

Updated on June 16, 2022

Comments

  • Eduardo Molteni
    Eduardo Molteni about 2 years

    I'm refactoring an old database and removing columns no longer in use. The DB used to have full text indexing, so, some column are marked for full text.

    How can I remove them?

    Notes:

    • DB is MS SQL Server Express 2008
    • Full text search service is no longer installed

    Edit:
    I have tried

    ALTER FULLTEXT INDEX ON tableName  DROP (ColumnName)
    

    But gets this error:

    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.
    
  • Thomas N
    Thomas N over 10 years
    Also note that you really must include the ( and ) in line 2, or get a syntax error
  • David
    David almost 9 years
    And to re-add the index if you're just altering the column: ALTER FULLTEXT INDEX ON TableName add (ColumnName) ALTER FULLTEXT INDEX ON TableName enable