When restoring my database i have a problem with the physical file of the full text catalog being in use.
The file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\MyCatalog' cannot be overwritten. It is being used by database 'demo2'.
I use this restore statement
RESTORE database demo from disk = N'c:\temp\demo.bak' WITH REPLACE
,MOVE 'demo_Data' TO 'd:\Program Files\Microsoft SQL Server 2005\MSSQL\Data\demo.MDF'
,MOVE 'demo_Log' TO 'd:\Program Files\Microsoft SQL Server 2005\MSSQL\Data\demo.LDF';
A solution would be to restore without the full text catalog, but i can’s figure out how to do that.
I have had to restore databases with full-text as well (in fact, fixed my auto-restore script to auto-restore full-text index as well)
I don’t know any way to NOT restore them (SQL restore will give you an error if you don’t specify RESTORE WITH MOVE for the full-text index, unless there is a path that matches the original path inside the .bak file)
I suggest
enumerate all full-text catalogs
SELECT name FROM DB.sys.fulltext_catalogs (SQL2005/2008)
then generate the drop command (you may have to drop the index on the tables before dropping the catalogs)
DROP FULLTEXT CATALOG [name]