Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Full Text Index error

Author  Topic 

Kurt Vergeyle
Starting Member

1 Post

Posted - 2008-02-13 : 05:43:35
Hi,

I build some t-sql code to check if full text is installed on the sql server. If not, some sql statements must be not executed. Here is my code:

if (select serverproperty('IsFullTextInstalled')) = 1
Begin

EXEC sp_fulltext_database 'enable'

CREATE FULLTEXT CATALOG [...] WITH ACCENT_SENSITIVITY = OFF AS DEFAULT

CREATE FULLTEXT INDEX ON dbo.Test (Name LANGUAGE 0, Description LANGUAGE 0) KEY INDEX IX_Test_1 ON [...] WITH CHANGE_TRACKING AUTO
ALTER FULLTEXT INDEX ON dbo.Test ENABLE

End

Statement 1 and 2 is not executed, but for statement 3 the server throws the following error:

Full-Text Search is not installed, or a full-text component cannot be loaded.

I don't know why the server tries to execute statement 3, because it is in an if statement.

This code fails only on a sql server where full text indexing is NOT installed.

Any help is welcome.
   

- Advertisement -