<p>I'm loading a <strong><em>SQL Server 2000</em></strong> database into my new <strong><em>SQL Server 2005</em></strong> <strong><em>instance</em></strong>. <strong><em>As expected, the full-text catalogs don't come with it.</strong> <strong>How can I rebuild them?</em></strong></p>

<p>Right-clicking my full text catalogs and hitting "<strong><em>rebuild indexes</em></strong>" just hangs for hours and hours without doing anything, so it doesn't appear to be that simple...</p>

[{'answer_id': 47900, 'author': 'Eugene Yokota', 'author_id': 3827, 'author_profile': 'https://Stackoverflow.com/users/3827', 'pm_score': 2, 'selected': True, 'text': '<p>Try it using SQL.</p>\n\n<ul>\n<li><a href="http://msdn.microsoft.com/en-us/library/ms189520%28SQL.90%29.aspx" rel="nofollow noreferrer">CREATE FULLTEXT CATALOG</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/library/ms176095%28SQL.90%29.aspx" rel="nofollow noreferrer">ALTER FULLTEXT CATALOG</a></li>\n</ul>\n\n<p>Here\'s an example from Microsoft.</p>\n\n<pre><code>--Change to accent insensitive\nUSE AdventureWorks;\nGO\nALTER FULLTEXT CATALOG ftCatalog \nREBUILD WITH ACCENT_SENSITIVITY=OFF;\nGO\n-- Check Accentsensitivity\nSELECT FULLTEXTCATALOGPROPERTY(\'ftCatalog\', \'accentsensitivity\');\nGO\n--Returned 0, which means the catalog is not accent sensitive.\n</code></pre>\n'}, {'answer_id': 47959, 'author': 'Matt Rogish', 'author_id': 2590, 'author_profile': 'https://Stackoverflow.com/users/2590', 'pm_score': 0, 'selected': False, 'text': '<p>Thanks, that helped because it showed what was wrong: My file paths were different. Here\'s how I fixed it:</p>\n\n<p>1) Load database from SQL 2000 backup</p>\n\n<p>2) Set compatibility mode to SQL 2005</p>\n\n<pre><code>USE mydb\nGO\n\nALTER DATABASE mydb SET COMPATIBILITY_LEVEL = 90\nGO\n</code></pre>\n\n<p>3) Get the filegroup names</p>\n\n<pre><code>SELECT name \n  FROM sys.master_files mf \n WHERE type = 4 \n   AND EXISTS( SELECT * \n                 FROM sys.databases db \n                WHERE db.database_id = mf.database_id \n                  AND name           = \'mydb\')\n</code></pre>\n\n<p>4) Then for each name (I did this in a little script)</p>\n\n<pre><code>ALTER DATABASE mydb \nMODIFY FILE( NAME = {full text catalog name}, FILENAME="N:\\ew\\path\\to\\wherever")\n</code></pre>\n\n<p>5) Then collect all the "readable" names of the catalogs:</p>\n\n<pre><code>SELECT name FROM sys.sysfulltextcatalogs\n</code></pre>\n\n<p>6) Finally, now you can rebuild each one:</p>\n\n<pre><code>ALTER FULLTEXT CATALOG {full text catalog name} REBUILD\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/47862', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2590/']