USE DatabaseName
GO
DECLARE @SQL2 NVARCHAR(MAX)
SET @SQL2=''
SELECT @SQL2=@SQL2+N'ALTER FULLTEXT INDEX ON '+T.name+' SET CHANGE_TRACKING AUTO
' FROM sys.tables T
INNER JOIN sys.fulltext_indexes I
ON T.object_id = I.object_id
AND (I.change_tracking_state='O' OR I.change_tracking_state='M')
PRINT @SQL2
EXEC(@SQL2)
批量修改全文索引的更改跟踪状态
最新推荐文章于 2022-12-05 14:58:07 发布