全文目录

sp_fulltext_database 'ENABLE'

CREATE FULLTEXT CATALOG FT_Catalog 
IN PATH 'E:\DB\'
AS DEFAULT;


/*

消息 1833,级别 16,状态 3,第 1 行
只有执行了下一个 BACKUP LOG 操作后,才能再次使用文件 'sysft_FT_Catalog'。

backup log  K2_Org to disk='d:\1.log'
*/


CREATE FUllTEXT INDEX ON dbo.ProcSummary
(
	 SummaryText ,SummaryXml
)
KEY INDEX PK_ProcSummary
ON FT_Catalog
WITH CHANGE_TRACKING OFF, NO POPULATION;



ALTER FULLTEXT INDEX ON dbo.ProcSummary SET CHANGE_TRACKING AUTO;

    


select * from ProcSummary where contains(SummaryText,'"*丽水*"')  
select * from ProcSummary where contains(SummaryXml,'"*丽水*"')


USE [K2_Org]
GO
IF  EXISTS (SELECT * FROM sys.fulltext_indexes fti WHERE fti.object_id = OBJECT_ID(N'[dbo].[ProcSummary]'))
ALTER FULLTEXT INDEX ON [dbo].[ProcSummary] DISABLE
GO
 
IF  EXISTS (SELECT * FROM sys.fulltext_indexes fti WHERE fti.object_id = OBJECT_ID(N'[dbo].[ProcSummary]'))
DROP FULLTEXT INDEX ON [dbo].[ProcSummary]

GO
IF  EXISTS (SELECT * FROM sysfulltextcatalogs ftc WHERE ftc.name = N'FT_Catalog')
DROP FULLTEXT CATALOG [FT_Catalog]

posted @ 2011-06-23 22:40  qanholas  阅读(574)  评论(0编辑  收藏  举报