Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.
like image 893
Eduardo Molteni Avatar asked Jun 23 '09 19:06

Eduardo Molteni


People also ask

How do I disable full-text search in SQL Server?

To enable or disable a table for full-text indexing. Expand the server group, expand Databases, and expand the database that contains the table you want to enable for full-text indexing. Expand Tables, and right-click the table that you want to disable or re-enable for full-text indexing.

Why is full-text index grayed out?

If “Full-Text Indexing” is greyed out it means that full-text indexing is not enabled.


2 Answers

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
like image 61
Eduardo Molteni Avatar answered Nov 12 '22 08:11

Eduardo Molteni


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' 
like image 44
Neelam Avatar answered Nov 12 '22 10:11

Neelam