I need to create a full text solution for one application. Application on sql
server 2005 sp2 server will need data refresh on a table every week. I will
need to upload table with new data and refresh full text index.
This is how I planed to do:
====
-- Built Full text catalog and index
-- switch to databse
use databasename
go
-- Set parameters before creating or refreshing full text index
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET CONCAT_NULL_YIELDS_NULL ON
SET NUMERIC_ROUNDABORT OFF
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
-- Preliminary cleanup
-- Disable full text index if exists
IF EXISTS (SELECT * FROM sys.fulltext_indexes fti WHERE fti.object_id =
OBJECT_ID(N'[schema].[Businesses]'))
ALTER FULLTEXT INDEX ON [schema].[Businesses] DISABLE;
GO
-- Delete full text index if it exists
IF EXISTS (SELECT * FROM sys.fulltext_indexes fti WHERE fti.object_id =
OBJECT_ID(N'[schema].[Businesses]'))
DROP FULLTEXT INDEX ON [schema].[Businesses];
GO
-- Delete FT Catalog if it exists
IF EXISTS (SELECT * FROM sysfulltextcatalogs ftc WHERE ftc.name = N'FTC')
DROP FULLTEXT CATALOG [FTC];
GO
-- End of Preliminary Cleanup *******************************
-- Create full text catalog and set it as the default catalog, shows up
under storage in object explorer
CREATE FULLTEXT CATALOG FTC
-- Drop esisting table schema.Businesses
IF EXISTS (SELECT * FROM sys.objects WHERE name = 'Businesses' AND type =
'U')
DROP TABLE schema.Businesses
go
-- Create table with full text search data from view [schema].[uv_Business2]
select * into schema.Businesses from schema.uv_Business2
-- update table schema.Businesses to make column companyname as not null
i.e. FT compatible
ALTER TABLE schema.Businesses ALTER COLUMN companyid int NOT NULL
-- Create unique index on schema.Businesses
CREATE UNIQUE INDEX ui_companyid on schema.Businesses(companyid)
-- Create full text index on table schema.Businesses for fields Companyname,
description and naic_description
CREATE FULLTEXT INDEX ON schema.Businesses (Companyname, description,
naic_description)
KEY INDEX ui_companyid on FTC
WITH CHANGE_TRACKING AUTO
PROBLEM IS when I execute “CREATE FULLTEXT CATALOG FTC” I get error:
Msg 1833, Level 16, State 3, Line 1
File 'sysft_BusinessesSearchCatalog' cannot be reused until after the next
BACKUP LOG operation.
========
How to solve this error and is do we have a better method to do this. I need
to create the script and give it to user to run it, preferably through a
batch file.

Signature
ontario, canada
db - 11 Jun 2008 21:26 GMT
Hi
When i change database recovery mode from "FULL" to "Simple" everything
works fine.
ALTER DATABASE <databaseName> SET RECOVERY SIMPLE.
But I need to keep database in full recovery mode??

Signature
ontario, canada
> I need to create a full text solution for one application. Application on sql
> server 2005 sp2 server will need data refresh on a table every week. I will
[quoted text clipped - 61 lines]
> to create the script and give it to user to run it, preferably through a
> batch file.
Russell Fields - 12 Jun 2008 16:09 GMT
db,
My first question is: Why drop the catalog? Isn't dropping the fulltext
index and recreating it enough for your purposes? If so, then the catalog
would only be created if it was missing. Doing this would eliminate the
whole issue of the latency of the catalog file name.
But, if not, can you simply add a BACKUP LOG command in your stream of work?
...
DROP FULLTEXT CATALOG [FTC];
GO
-- End of Preliminary Cleanup *******************************
BACKUP LOG databasename TO DISK='the appropriate path to the backup area'
-- Create full text catalog and set it as the default catalog, shows up
under storage in object explorer
CREATE FULLTEXT CATALOG FTC
...
(By the way, this newsgroup is for SQL Server Compact Edition. You probably
wanted microsoft.public.sqlserver.fulltext.)
RLF
> Hi
>
[quoted text clipped - 76 lines]
>> to create the script and give it to user to run it, preferably through a
>> batch file.