You are not Logged in
Would you like to Login or Register

Today is: 05 February 2012
Check this months hot topics

Full Text Search in SQL 2005

Full Text Search was installed when SQL Server was installed and a service was running, so I expected it to just be sitting there waiting. This is unlike SQL 2000, where I lost count of how many times I had to install it on different servers.

Was I wrong in expecting it to just work?

Absolutely! (WRONG!!)

It seems that there is a fault in the installer that defaults the service to run under the LocalSystem account.

Fix here :- http://support.microsoft.com/?kbid=907256

Having fixed this, I went on to use Full Text Search and still no luck. The option was disabled in the management console.

UNTIL

I issued the commands

USE MyDatabase
EXEC sp_fulltext_database  'enable'

"At this point, the Full Text Search was available in the Management Console"

From here in TSQL :-

--1  Create the catalog (unless you already have)

EXEC sp_fulltext_catalog   'FTCatalog','create' 

--2  Add a full text index to a table 

EXEC sp_fulltext_table     'Departments''create''FTCatalog''pk_departments' 
EXEC sp_fulltext_table     'Employees''create''FTCatalog''pk_employees' 

--3  Add a column to the full text index 

EXEC sp_fulltext_column    'Departments''ProductName''add' 
EXEC sp_fulltext_column    'Employees''Description''add' 

--4  Activate the index 

EXEC sp_fulltext_table     'Departments','activate' 
EXEC sp_fulltext_table     'Employees','activate' 

--5  Start full population 

EXEC sp_fulltext_catalog   'FTCatalog''start_full' 
kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Ric Hayman MCPD Skype
Author : Ric Hayman MCPD
Published : 03 August 2006

Ric is an MCPD Microsoft Certified Professional Developer with over 25 years commercial development experience using Microsoft technologies.

Comments

Elja Trum said:

Very usefull information, thx!

Got it to work with your help.

Needed to find the PK key indentifier (cost me some time).

So for others: rightclick on the primairy key in table (modify) and choose 'indexes/keys'.

December 02, 2008 - 11:11 AM

Arif said:

Very nice Examle of full text search

April 14, 2010 - 12:59 PM

Turbo said:

Thanks! That helped me a lot!>

August 03, 2010 - 10:25 AM

Elamparithi said:

Nice one

August 12, 2010 - 11:24 AM

Santhosh Kumar said:

To get the index name use the below query.

sp_helpindex 'tablename'

October 06, 2010 - 10:16 AM

K.Arun said:

clear description.thanks a lot

February 03, 2011 - 9:59 AM

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views