In the earlier versions of SQL Server, it was very difficult to view the unstructured documents placed in the SQL Server. But in SQL Server 2012, with the solution shipped namely Semantic Search not only can you easily look inside in the unstructured documents but also you can create phrase table to find key phrases, similar documents, related documents as well. This feature gave boost to another newly introduced feature namely File Table in SQL Server 2012. You must install and configure Semantic Search before you use it.
Let’s install / configure it Step by Step.
In order to install Semantic Search, first of all you need to check whether FULL TEXT SEARCH feature is installed in your SQL Server or not. Because Semantic search feature is based on Full text search feature.
Given below is the script to check this.
USE master GO SELECT SERVERPROPERTY('IsFullTextInstalled') AS [Result] GO --OUTPUT
(1 row(s) affected)
If result of step 1 is 1 then you should not do anything in Step 2. But if the result is 0, you must run the SQL Server setup again, go to Feature Selection option, select Full-Text and Semantic Extractions for search and install this feature (as shown in the picture below).
Once you install the Full-Text and Semantic Extractions for search feature, you need to check whether Semantic Language Statistics Database (One of the core dependency of Semantic searches) is installed or not. Given below is the script to check.
USE master GO SELECT * FROM sys.fulltext_semantic_language_statistics_database GO --OUTPUT
Ooooppss……… as you can see, the output says blank; it means semantic language statistics database is not yet installed. So you need to install it.
To install semantic language statistics database, you need to go to SQL Server installation media and browse the given below folder and run SemanticLanguageDatabase.msi
• For x86 : …\x86\Setup\SemanticLanguageDatabase.msi
• For x64 : …\x64\Setup\SemanticLanguageDatabase.msi
Given below is the screen image.
Once you execute the above SemanticLanguageDatabase.msi and install it properly, it will give you two database files (semanticsDB, semanticsdb_log) in a location (C:\Program Files\Microsoft Semantic Language Database), in case you install it in the default location. Now you have database files, just attach these files in your SQL Server.
Once you attach these database files in your SQL Server, then you have to register semantic language database. Given below is the script.
EXEC sp_fulltext_semantic_register_language_statistics_db @dbname = N'semanticsdb' GO
Again, you need to check whether the semantic language statistics database is installed or not. Given below is the script.
SELECT * FROM sys.fulltext_semantic_language_statistics_database GO --OUTPUT
Now, you can see that the semantic language statistics database is installed.
In my next article, I will discuss how to implement semantic search on file tables and make your life easier.
Reference : MSDN