Skip to content

Instantly share code, notes, and snippets.

@nekitozzz
Last active August 29, 2015 14:13
Show Gist options
  • Save nekitozzz/6d9681d90338d48ab31f to your computer and use it in GitHub Desktop.
Save nekitozzz/6d9681d90338d48ab31f to your computer and use it in GitHub Desktop.
True if FullTex indexing of database is done
CREATE FUNCTION [dbo].[is_fulltext_indexed]()
RETURNS BIT
AS
BEGIN
RETURN
CASE
WHEN (SELECT COUNT(*) FROM
(SELECT
FULLTEXTCATALOGPROPERTY(fc.[name],'PopulateStatus') AS PopulateStatus
FROM sys.fulltext_catalogs fc) t
WHERE t.PopulateStatus <> 0)
= 0 THEN 1
ELSE 0
END
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment