September 12, 2005 at 6:30 am
Is there an SP or a function that I can use to determine if a table has been indexed to allow for full-text searches?
Jim
September 12, 2005 at 6:52 am
This is a good start... but you'll have to dig around for the status column meanings :
Select CT.ftcatid, O.name as TableName, CT.name as CatalogName, CT.Status from dbo.sysfulltextcatalogs CT inner join dbo.SysObjects O on CT.ftcatid = O.ftcatid
September 12, 2005 at 7:08 am
Thanks! I can use this query in my screen form to determine if a specific table is indexed for full text search before I submit a query that has the CONTAINS or FREETEXT keywords in it.
Jim
September 12, 2005 at 11:26 am
Shouldn't you make sure that it is BEFORE you write the code and send it to production??
September 13, 2005 at 8:18 am
Jim, et al.,
While using system tables is Ok in SQL 2000, in future version of SQL Server (2005 or Yukon), it is best to use existing metadata functions, for example:
use
pubs
go
SELECT COLUMNPROPERTY( OBJECT_ID('authors'),'au_lname','IsFulltextIndexed')
-- returns: 1 for True.
See other FTS metadata functions at SQL 2000 BOL title "Full-text Query Transact-SQL Components"
Hope that helps!
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
John T. Kane
September 13, 2005 at 12:50 pm
I am assuming you also know Full Text search is dependent on Microsoft search service so you have to populate the catalog to get expected results from CONTAINS, CONTAINSTABLE, FREETEXT and FREETEXTTABEL. Hope this helps.
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
September 13, 2005 at 1:21 pm
How about SP_HELP_FULLTEXT_TABLES?
Greg
Greg
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply