Horkay Blog
The postings on this site are my own and do not represent my Employer's positions, advice or strategies.
Friday, April 25, 2008

When migrating a database, via backup from a sql server 2000 instance to a sql server 2005 instance, the full-text catalogs must be rebuilt.

This is most evident when a full backup fails with the following error:

System.Data.SqlClient.SqlError: The backup of full-text catalog 'DevStudio' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online. Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data.  (Microsoft.SqlServer.Smo)

To correct this error you can uses pieces of the following script, ensure to change your database, paths and catalogs as appropriate for your environment:

/*

Create a Full-Text Catalog and Index

*/

/**************** Return info about Full-Text Catalog and Index *********************/

-- Obtain a list of all the full-text catalogs linked to the current database by running this query:

EXEC sp_help_fulltext_catalogs

-- SELECT name FROM sys.fulltext_catalogs;

-- Returns information about full-text catalog properties

SELECT FULLTEXTCATALOGPROPERTY('DevStudio','PopulateStatus')

-- Obtain a list of all the tables in the database that have been enabled for full-text processing:

sp_help_fulltext_tables;

sp_help_fulltext_tables @fulltext_catalog_name = 'DevStudio'; -- all the tables linked to that full-text catalog

-- select * from sys.fulltext_indexes

-- Obtain a list of all the columns in the database that have been enabled for full-text processing:

sp_help_fulltext_columns;

sp_help_fulltext_columns @table_name = 'XmlFile' -- returns list of all the columns for a single table

-- select * from sys.fulltext_index_columns

 

/**************** Create a Full-Text Catalog and Index *********************/

-- CREATE FULLTEXT CATALOG DevStudio;

create FULLTEXT CATALOG [CDD]

in PATH N'D:\Shr2k5a\data\FTSearch'

AUTHORIZATION [dbo]

CREATE FULLTEXT INDEX ON XmlFile(Type, Content)

KEY INDEX PK_XmlFile

ON CDD;

 

/**************** Rebuild and Populate Full-Text Catalog *******************/

-- Rebuild, but do not repopulate, the full-text catalog:

EXECUTE sp_fulltext_catalog 'CDD', 'Rebuild';

-- NOTE: The sp_fulltext_database stored procedure with the ENABLE option may be used to rebuild all known full-text catalogs

-- Start a full population of the full-text catalog

EXECUTE sp_fulltext_catalog 'CDD_07', 'start_full';

 

/**************** Drop a Full-Text Index and Catalog **********************/

-- Unregister a table for full-text processing:

DROP FULLTEXT INDEX ON dbo.XmlFile;

-- Drop the full-text catalog from the file system and its metadata from the catalog views:

DROP FULLTEXT CATALOG DevStudio;

 

Friday, April 25, 2008 12:00:46 PM (Central Standard Time, UTC-06:00) | Comments [0] |  Full-Text#
Comments are closed.
Search
Popular Posts
Unpatched Vulnerabiltiy discovered ...
Spring Fornicator brewed...
TOE, Packet Loss, Blue Screen crash...
Bravo base to Ghost rider tango
Error installing Cumulative Update ...
Recent Posts
Archive
Links
Categories
Admin Login
Sign In
Blogroll