SQL Server - Check If The Full-Text And Semantic Indexing Components Are Installed Or Not

Check if the full-text and semantic indexing components are installed or not using SERVERPROPERTY In SQL Server

In this blog, we will see how to check if the full-text and semantic indexing components are installed or not using "SERVERPROPERTY".

What's the "SERVERPROPERTY"?

"SERVERPROPERTY" is a System-defined function used to return the SQL Server instance information.

"SERVERPROPERTY" Syntax

  1. SERVERPROPERTY ('propertyname')

ISFULLTEXTINSTALLED

We use ISFULLTEXTINSTALLED property to check if the full-text and semantic indexing components are installed or not.
 
0 Not Installed
1 Installed

Example

  1. declare @IsFullTextInstalled as sql_variant
  2. set @IsFullTextInstalled = (select SERVERPROPERTY('IsFullTextInstalled'))
  3. select @IsFullTextInstalled as IsFullTextInstalled ,
  4. case @IsFullTextInstalled
  5. when 0 then 'Full-text and semantic indexing components are not installed'
  6. when 1 then 'Full-text and semantic indexing components are installed'
  7. else 'Invalid Input'
  8. end as 'IsFullTextInstalled Status'
Output

Check if the full-text and semantic indexing components are installed or not, using PowerShell.

You can use Windows PowerShell to invoke the SQL command on a reachable server within the network using Invoke-Sqlcmd cmdlet as the following,
  • Open Windows PowerShell as Administrator.
  • Type the Invoke-Sqlcmd with the below parameters.

    • -query: the SQL query that you need to run on the remote server.
    • -ServerInstance: the SQL server instance name.
    • -Username: the username that has sufficient permission to access and execute SQL query on the remote server.
    • -Password: the password of the elevated user.

      PS SQLSERVER:\> Invoke-Sqlcmd -query "select SERVERPROPERTY('IsFullTextInstalled') as 'IsFullTextInstalled'" -ServerInstance "epm\epmdb" -Username sa -Password *****

Applies to

  • SQL Server 2008.
  • SQL Server 2012.
  • SQL Server 2014.
  • SQL Server 2016.
  • SQL Server 2017.

Reference

See Also