How can I know when SQL Full Text Index Population is finished?

image

When you execute some queries on your SQL Server, are you sure the catalog is being imported?

With this simple script you can know which is the Index status.

DECLARE @CatalogName VARCHAR(MAX)
SET     @CatalogName = 'TEST_FullIndex'

SELECT FULLTEXTCATALOGPROPERTY(@CatalogName,'ItemCount') as NumberOfItems, 
	   FULLTEXTCATALOGPROPERTY(@CatalogName,'ImportStatus') as ImportStatus,
	   DATEADD(ss, FULLTEXTCATALOGPROPERTY(@CatalogName,
                     'PopulateCompletionAge'), '1/1/1990') AS LastPopulated,
    (SELECT CASE FULLTEXTCATALOGPROPERTY(@CatalogName,'PopulateStatus')
        WHEN 0 THEN 'Idle'
        WHEN 1 THEN 'Full Population In Progress'
        WHEN 2 THEN 'Paused'
        WHEN 3 THEN 'Throttled'
        WHEN 4 THEN 'Recovering'
        WHEN 5 THEN 'Shutdown'
        WHEN 6 THEN 'Incremental Population In Progress'
        WHEN 7 THEN 'Building Index'
        WHEN 8 THEN 'Disk Full.  Paused'
        WHEN 9 THEN 'Change Tracking' END) AS Status
FROM sys.fulltext_catalogs AS cat

 

More information about the status or other property on Microsoft https://technet.microsoft.com/en-us/library/ms190370.aspx

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.