Freetext search in sql server
Hello all-
This is much more a SQL Server question than a ColdFusion
question- but I'm not using Transact SQL, so the SQL Server
resources aren't really telling me anything I need to know.
I'm using FREETEXT for full-text searching on SQL Server
2000. (CF8 on Windows) Currently this gives me an 'OR' search.
So if I put in 3 words such as: 'web policy manual' the
search will come back with anything that contains ANY of those
words.
Does anyone know how to change that to an AND search that
will return only the documents that contain all three?
Thanks for any help-
Karl
I did end up using CONTAINS, but it took me a few tries to
get it right.
Contains with an 'OR' is easy, but contains with 'AND' means
that each word in your search criteria needs to be in a different
function. And none of those functions can fail, or the whole thing
will fail.
So first I had to clean up the search critiera, then do the
search itself. I have attached code samples below.
Thanks for the suggestions-
Similar Messages
-
Sharepoint Fast Search vs SQL server fulltext index
HI ,
I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
Thank you.
JamesPlease have a look at these links:
SharePoint Search and FAST Search for SharePoint
Architecture Diagrams – Fault Tolerance and Performance
Understand
FAST Search Logical Architecture for SharePoint 2010
Full-Text
Search Architecture
sqldevelop.wordpress.com -
Installing Full-Text Search in SQL Server 2008 Standard
Hello,
We have a SQL Server 2008 Standard server, and I need to install full-text search in order to take advantage of some features with Autodesk Vault. I believe that I understand the procedure to do so, but, does the installation of the setup tools
and full-text search component cause any interruption to the database instances (or require a reboot)?
ThanksHi Indiana Grumpycooter,
Full text search feature is supported by the SQL Server 2008 standard version, so you can install this feature in
installation page of the SQL Server Installation Wizard. There is an similar example about adding SQL Full-Text Search to an existing SQL Server, you can review the following steps.http://www.techrepublic.com/blog/data-center/adding-sql-full-text-search-to-an-existing-sql-server/
In addition, you can also install this feature via command line as follows. For more information, see:
http://msdn.microsoft.com/en-us/library/ms144259(v=sql.100).aspx
Setup.exe /q /ACTION=Install /FEATURES= Full-Text /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="<StrongPassword>" /SQLSYSADMINACCOUNTS
As other post, it will not cause interruption, and you require a reboot after installing Full-Text feature.
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Unable to install SQL Server 2012 Developer
I have a problem with installing SQL Server 2012 (no matter which edition I choose). Installation usually runs well, but near the end shows up an error:
TITLE: Microsoft SQL Server 2012 Service Pack 1 Setup
The following error has occurred:
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%25400x4BDAF9BA%25401306%254026
BUTTONS:
OK
The help link points to not-existing article on MSDN page. After I click OK button, the installation reaches it's end and shows up another, which tells, that Database Engine Services, Reporting Services - Native, Data Quality Services, Full-Text and Semantic
Extractions for Search and SQL Server Replication failed to install.
After that I am able to start, for example SQL Management Studio, but cannot connect to database. Also services of SQL Server (Server, Server Agent, Full-text Filter, Reporting Services) are stopped and I am not able to start them manually (any try throws an
error: "The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details").
I tried complete reinstalling of SQL Server, cleaning registry entries, different editions of that software - none method helped. Also, I tried the .iso images of installation media on other computers - it worked well and installed without any errors. My OS
is Windows 8.1 x64.Hello,
Please uninstall SQL server completely from add remove program.Make sure you uninstall it completely
Now right click on Setup.exe file which is there in SQL Server installable and select run as administrator to start installation.
On page where you are asked to provide startup account for SQL Server service select NT Authority\System or Local System account.
This issue is basically after installation SQL Server is not able to bring online database services using account which you selected .Local system account will allow it to come online
After installation change startup account to domain account with least privilege
Hope this helps
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
I was running SQL Server 2012 in Win 7 64 bit OS. Some how I found SQLSERVER server is not running and I was not able to run the service. Then I tried to unisntall and install again. And I found that some of the SQL Server
features got failed, like: Reporting Services - Native, Database Engine Services, Data Quality Services, Full-Text and Semantic Extractions for Search and SQL Server Replication. I checked the Summary.txt
file from location C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log. It thsi logs referes to another log file location like:
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 1639
Component log file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140127_151409\sql_engine_core_inst_Cpu64_1.log
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=sql_engine_core_inst.msi%400x162A16FE%400x1639
I did unisntall/install multipel times. But fhw to fix the issue that saying in sql_engine_core_inst_Cpu64_1.log file.:
=== Verbose logging started: 1/27/2014 15:45:04 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012\x64\ScenarioEngine.exe ===
MSI (c) (C4:BC) [15:45:04:321]: Resetting cached policy values
MSI (c) (C4:BC) [15:45:04:321]: Machine policy value 'Debug' is 0
MSI (c) (C4:BC) [15:45:04:321]: ******* RunEngine:
******* Product: E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
******* Action:
******* CommandLine: **********
MSI (c) (C4:BC) [15:45:04:322]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (C4:BC) [15:45:04:322]: Grabbed execution mutex.
MSI (c) (C4:BC) [15:45:04:323]: Cloaking enabled.
MSI (c) (C4:BC) [15:45:04:323]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (C4:BC) [15:45:04:323]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (38:8C) [15:45:04:327]: Running installation inside multi-package transaction E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
MSI (s) (38:8C) [15:45:04:327]: Grabbed execution mutex.
MSI (s) (38:A0) [15:45:04:327]: Resetting cached policy values
MSI (s) (38:A0) [15:45:04:327]: Machine policy value 'Debug' is 0
MSI (s) (38:A0) [15:45:04:327]: ******* RunEngine:
******* Product: E:\Software\SQL Full Installation\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi
******* Action:
******* CommandLine: **********
MSI (s) (38:A0) [15:45:04:452]: Machine policy value 'TransformsSecure' is 0
MSI (s) (38:A0) [15:45:04:452]: User policy value 'TransformsAtSource' is 0
MSI (s) (38:A0) [15:45:04:475]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (38:A0) [15:45:04:475]: Specified instance {18B2A97C-92C3-4AC7-BE72-F823E0BC895B} via transform :InstID01.mst;:InstName02.mst is already installed. MSINEWINSTANCE requires a new instance that is not installed.
MSI (s) (38:A0) [15:45:04:475]: MainEngineThread is returning 1639
MSI (s) (38:8C) [15:45:04:477]: User policy value 'DisableRollback' is 0
MSI (s) (38:8C) [15:45:04:477]: Machine policy value 'DisableRollback' is 0
MSI (s) (38:8C) [15:45:04:477]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (38:8C) [15:45:04:478]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (38:8C) [15:45:04:478]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (38:8C) [15:45:04:478]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (38:8C) [15:45:04:478]: Restoring environment variables
MSI (c) (C4:BC) [15:45:04:481]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (C4:BC) [15:45:04:481]: MainEngineThread is returning 1639
=== Verbose logging stopped: 1/27/2014 15:45:04 ===
Please advice. I searched many places and did not get actual solution that will resolve my case.
Nusrat AkhterHi Nusrat Akhter,
According to your description, when installing the first install failed, and it looks like the instance did not uninstall completely. To solve the issue I recommend you changed the instance name in re-installing SQL Server, and check if it can work fine.
There is a similar issue that the SQL engine will not start, and there is no method of uninstalling either it, or any of the components etc. You can review the following post.
https://connect.microsoft.com/SQLServer/feedback/details/710892/sql-server-2012-rc0-install-fails-citing-invalid-drivers
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support -
SQL Server Express 2014 Installation Completes with Failures and Repair Does Nothing to Help
I am attempting to install SQL Server Express 2014 on a development machine and as usual old versions of SQL and the remnants of them are a plague to the installation.
I have used to Revo Uninstaller to scrub the old installations and with my first attempt after some additional work on the registry I was able to get an instance to install and remarkably I was able to connect to the instance. However, I removed an application
reference to SQL Server 2008 after the SQL Express 2014 installation (through Control Panel > Programs > Programs and Features) and it stopped working immediately.
So I removed (uninstalled using Revo Uninstaller) every reference to any SQL Server application as well as removed all of the registry references (using Revo) and I can now install SQL Server Express 2014 with
"Feature" failures [Reporting Services, Database Engine Services, Full-Text and Semantic Extractions for Search and SQL
Server Replication] and of course it doesn't work.
Now when I attempt "Repair" the installation the process ends normally (no errors) and reports "Success" however SQL still has no instance and the services are not running nor are they visible when I open the "SQL Server Configuration
Manager".
This is the "Repair" log:
Overall summary:
Final result: Passed
Exit code (Decimal): 0
Start time: 2014-12-21 17:21:37
End time: 2014-12-21 17:29:10
Requested action: Repair
Machine Properties:
Machine name: EDWARD-PC2
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
SQL Server 2014 Management Tools - Basic 1033 Express Edition 12.0.2000.8 No Yes
SQL Server 2014 Management Tools - Complete 1033 Express Edition 12.0.2000.8 No Yes
SQL Server 2014 Client Tools Connectivity 1033 Express Edition 12.0.2000.8 No Yes
SQL Server 2014 Client Tools Backwards Compatibility 1033 Express Edition 12.0.2000.8 No Yes
SQL Server 2014 Client Tools SDK 1033 Express Edition 12.0.2000.8 No Yes
SQL Server 2014 LocalDB 1033 Express Edition 12.0.2000.8 No Yes
Package properties:
Description: Microsoft SQL Server 2014
ProductName: SQL Server 2014
Type: RTM
Version: 12
SPLevel: 0
Installation location: C:\Users\Edward\Downloads\SQLEXPRADV_x86_ENU\x86\setup\
Installation edition:
User Input Settings:
ACTION: Repair
AGTDOMAINGROUP: <empty>
AGTSVCACCOUNT: <empty>
AGTSVCPASSWORD: <empty>
AGTSVCSTARTUPTYPE: Manual
ASCONFIGDIR: Config
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CONFIGURATIONFILE:
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
ENU: true
FAILOVERCLUSTERGROUP: <empty>
FAILOVERCLUSTERNETWORKNAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: false
INDICATEPROGRESS: false
INSTANCENAME: <empty>
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
QUIET: false
QUIETSIMPLE: false
SQLSVCACCOUNT: <empty>
SQLSVCPASSWORD: <empty>
UIMODE: AutoAdvance
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Client Tools SDK
Status: Passed
Feature: Client Tools Backwards Compatibility
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: SQL Browser
Status: Passed
Feature: Documentation Components
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: LocalDB
Status: Passed
Feature: SQL Client Connectivity
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Feature: Setup Support Files
Status: Passed
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\SystemConfigurationCheck_Report.htm
However this is what the "SQL Sever Configuration Manager" look like:
Why does this appear to not be working properly? I can not connect the the "local" instance and I would guess that the service either does not exist or is not running.
Edward WalkerHello,
To my knowledge, Revo is not a supported way to uninstall SQL Server.
Please try to uninstall all you can using Control Panel -> Programs and Features, then perform a manual uninstall to
remove remnants. Try the following procedure:
1. Uninstall all SQL Server 2012 components you can using Control Panel -> Programs and Features
2. Backup the registry.
3. Delete the following keys in regedit:
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing
SQL Server.
5. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server.
6. Rename all the SQL Server folders in the computer like C:\Program Files\Microsoft SQL Server and subfolders.
After performing above procedure, try to reinstall SQL Server again.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Startup Setting of sql 2014 Clustered "SQL Server" Service
New cluster in testlab:
Windows Server 2012 R2: N1, N2 (node 1, node 2)
Sql Server 2014 installed on N1, N2
Storage server (uses SMB share for Sql Data and Quorum).
N1 is active; N2 is passive. What is the proper setup for the SqlServer and SqlServerAgent
services on both boxes? (Should they be "manual" for both?)
TIA,
edm2
PS. I wonder if the startup setting option is used to implement the Active\passive state.N1 is active; N2 is passive. What is the proper setup for the SqlServer and SqlServerAgent
services on both boxes? (Should they be "manual" for both?)
Hi edm,
In a two-node Windows Failover Cluster with SQL Server, one of the physical nodes is considered the active node, and the second one is the passive node for that single SQL Server instance. A single SQL Server instance can run on only a single node at a time;
and should a failover occur, the failed instance can failover to another node.
When we create a SQL Server Failover cluster, The startup type is set to manual for all cluster-aware services, including full-text search and SQL Server Agent, and cannot be changed during installation. Microsoft recommends that you configure service accounts
individually to provide least privileges for each service, where SQL Server services are granted the minimum permissions.
For more information, you can review the following article.
http://www.mssqltips.com/sqlservertip/1709/install-sql-server-2008-on-a-windows-server-2008-cluster-part-3/
Regards,
Sofiya Li
If you have any feedback on our support, please click
here.
Sofiya Li
TechNet Community Support -
A customer asked me if its possible to define in the Active Directory, the SQL Server Roles that should be automatically assigned to a sql server Login that is mapped to a Windows Account.
In short, his idea is:
- he creates in the Active Directory a User Group that "knows" about the SQL Server "SecutityAdmin" role
- some Windows Windows Accounts are Member of this AD Group
- if one of this Windows Domain Account is mapped to a SQL Server Login "CREATE LOGIN [<domainName>\<login_name>] FROM WINDOWS;" the created SQL Server Login will automatically be a Member of the SQL Server SecurityAdmin.
Do you know if its possible to configure the AD / SQL Server in this manner?
I invested some time searching through SQL Server Onlinehelp and AD Documentation. Found nothing. Dont even know if its fiction or a realistic wish.
Any help, hint, adivce is really appreciated.
Best Regards
PaoloYes, you can create an AD Group named "SQLSecurityAdmins", assign a login in SQL Server to this group and grant SecurityAdmin role to it (exec sp_addsrvrolemember).
Bodo Michael Danitz - MCT, MCITP - free consultant - performance specialist - www.sql-server.de
Hi Bodo
Thank you very much for your reply. Dont know if i got it right.
I create the AD Group "SQLSecurityAdmin", assign it to SQL Server Login and manually add the SQL Server Login as a Member of the SQL Server "SecurityAdmin" Role.
Now i have a new AD User "NewUser", make him a member of the AD Group "SQLSecurityAdmin". Then i execute "CREATE LOGIN [DomainName\NewUser] FROM WINDOWS;". Is now the new SQL Login Mapped to the Windows Account "DomainName\NewUser" automatically member of
the SQL Server SecurityAdmin Group?
Best Regards
Paolo -
Which version of SQL Server should I download?
I'm just starting out with ASP.NET MVC developning web apps, which of these should I download and why?
Express 32BIT WoW64\SQLEXPR32_x86_ENU.exe
149.9 MB
<input class="wizard-check" data-name="Express 32BIT\SQLEXPR_x86_ENU.exe" data-size="176626720" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="1" />
Express 32BIT\SQLEXPR_x86_ENU.exe
168.4 MB
<input class="wizard-check" data-name="Express 64BIT\SQLEXPR_x64_ENU.exe" data-size="206300720" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="2" />
Express 64BIT\SQLEXPR_x64_ENU.exe
196.7 MB
<input class="wizard-check" data-name="ExpressAdv 32BIT\SQLEXPRADV_x86_ENU.exe" data-size="1179270072" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="3" />
ExpressAdv 32BIT\SQLEXPRADV_x86_ENU.exe
1.1 GB
<input class="wizard-check" data-name="ExpressAdv 64BIT\SQLEXPRADV_x64_ENU.exe" data-size="1202918472" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="4" />
ExpressAdv 64BIT\SQLEXPRADV_x64_ENU.exe
1.1 GB
<input class="wizard-check" data-name="ExpressAndTools 32BIT\SQLEXPRWT_x86_ENU.exe" data-size="881606336" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="5" />
ExpressAndTools 32BIT\SQLEXPRWT_x86_ENU.exe
840.8 MB
<input class="wizard-check" data-name="ExpressAndTools 64BIT\SQLEXPRWT_x64_ENU.exe" data-size="873690784" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="6" />
ExpressAndTools 64BIT\SQLEXPRWT_x64_ENU.exe
833.2 MB
<input class="wizard-check" data-name="LocalDB 32BIT\SqlLocalDB.msi" data-size="38428672" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px 8px 0px
0px;vertical-align:middle;" type="checkbox" value="7" />
LocalDB 32BIT\SqlLocalDB.msi
36.6 MB
<input class="wizard-check" data-name="LocalDB 64BIT\SqlLocalDB.msi" data-size="45215744" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px 8px 0px
0px;vertical-align:middle;" type="checkbox" value="8" />
LocalDB 64BIT\SqlLocalDB.msi
43.1 MB
<input class="wizard-check" data-name="MgmtStudio 32BIT\SQLManagementStudio_x86_ENU.exe" data-size="705741376" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="9" />
MgmtStudio 32BIT\SQLManagementStudio_x86_ENU.exe
673.0 MB
<input class="wizard-check" data-name="MgmtStudio 64BIT\SQLManagementStudio_x64_ENU.exe" data-size="717092824" style="font-family:wf_segoe-ui_normal, Tahoma, Verdana, Arial, sans-serif;font-size:13px;width:21px;height:21px;margin:0px
8px 0px 0px;vertical-align:middle;" type="checkbox" value="10" />
MgmtStudio 64BIT\SQLManagementStudio_x64_ENU.exeYou should use
SQL Server 2014 Express with Tools 64 Bit
This package contains the core SQL Server database along with the tools to manage SQL Server instances including SQL Server Express, LocalDB, and SQL Azure. If you need Reporting Services or Full text search, use SQL Server Express with Advanced Services.
http://www.microsoft.com/en-us/server-cloud/Products/sql-server-editions/sql-server-express.aspx
Because it has everything you need.
Also check out Azure SQL Database http://azure.microsoft.com/en-us/services/sql-database/, which you can also use for production and you don't have to run a SQL Server VM.
David
David http://blogs.msdn.com/b/dbrowne/ -
Explain about sql server XML
All related topic about XML in sql server
Hmm
Do you expect someone to write an essay for you?
Why not do some google search?
A simple search on SQL Server XML brings you lots of articles including these
http://technet.microsoft.com/en-us/library/ms189887(v=sql.105).aspx
https://www.simple-talk.com/sql/database-administration/manipulating-xml-data-in-sql-server/
https://www.simple-talk.com/sql/learn-sql-server/the-xml-methods-in-sql-server/
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
SQL Server Free Text Search with multiple search words inside a stored procedure
I am trying to do a free text search. basically the search string is being sent to a stored procedure where it executes the free text search and returns the result.
If I search for red
flag, I want to return the results that matches both red and flag text.
Below is the query I use to return the results.
select * from customer where FREETEXT (*, '"RED" and "flag"')
This doesn't give me the desired result. Instead this one give the desired result.
select * from customer where FREETEXT (*, 'RED') AND FREETEXT (, 'FLAG')
My problem is since it's inside a stored procedure, I will not be able to create the second query where clause. I thought both query should return the same result. Am I doing something wrong here?I am moving it to Search.
Kalman Toth Database & OLAP Architect
IPAD SELECT Query Video Tutorial 3.5 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Is a Full Text Index search case sensitive or not in SQL Server 2012?
I setup full text index on my contact table and am attempting to run a search on it using the following query:
SELECT *
FROM sysdba.Contact C
WHERE CONTAINS(C.FirstName, 'Test')
OR CONTAINS(C.LastName, 'Test')
The problem is it's clearly running a case sensitive search. I did a quick search to find out how to change it to be case in-sensitive and found two pages (both for SQL Server 2012) with conflicting answers:
1 - MSDN - "Query with Full-Text Search" - http://msdn.microsoft.com/en-us/library/ms142583(v=sql.110).aspx
Case sensitivity
Full-text search queries are case-insensitive. However, in Japanese, there are multiple phonetic orthographies in which the concept of orthographic normalization is akin to case insensitivity (for example, kana = insensitivity). This type of orthographic normalization
is not supported.
1 - TechNet - "Full-Text Search (SQL Server)" - http://technet.microsoft.com/en-us/library/ms142571(v=sql.110).aspx
Full-text queries are
not case-sensitive. For example, searching for "Aluminum" or "aluminum" returns the same results.
Can someone please explain this? Is it possible to do it without it being case sensitive? If yes, how?
(Sorry, I couldn't make those links b/c TechNet hasn't verified my account)
Thank you for your time and help,
HananWhats the collation setting for the columns? try using a case insensitive collation as below
SELECT *
FROM sysdba.Contact C
WHERE CONTAINS(C.FirstName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
OR CONTAINS(C.LastName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
What is the different between Sharepoint fast search service and Sql server fulltext search?
HI ,
I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
Thank you.
JamesThey are very, very different beasts.
Firstly FAST Search for SharePoint is the old name for the product and is only relevant for SharePoint 2010 not 2013. It got merged into the standard SharePoint search for the 2013 release.
SharePoint search is aimed at providing a Bing or Google like experience for your intranet content, as well as providing some nifty features that are purely SharePoint releated along the way. That means it can crawl SharePoint content, file shares,
outlook mailboxes, internal and external websites and probably fifty other different things if you really tried. Whilst i'm not an expert on SQL full text search I believe it's intended to provide a search feature for content held within SQL databases
and tables.
Can you run SharePoint purely for Search? Yes, definitely. -
Full-Text search is not working with PDF files - SQL Server 2012 64 bit
Hi,
We are in the process of storing PDF files in SQL Server 2012 with Full-Text search capability.
I followed the steps as below and it works fine with word document but not for PDF files. I tried with PDF ifiler 11 & 9 and both are unsuccessful.
Server/DB Level Settings:
1)
Enable FileStream
2)
Install Full-Text
then restart
3)
Use [specific db]
alter
database [db name]
add
filegroup Files
contains filestream;
alter
database [db name]
add
file (
name = N'Files',
filename =
N'D:\SQL\DATA') to
filegroup [Files];
3)
Database level
Settings:
FileStream:
FileStream
Directory name:
[Set the name]
FileStream
non-transacted
Access: [set Appropriate]
3a)
Add a
datafile to DB
with filestreamdata
filetype.
4)
Share D:\SQL\DATA
directory and
add specific accounts
with read/write
access
5)
Give bulkadmin
access to those
specific accounts
at server
level
6)
From the
page (link)
download and
install the *.pdf
IFilter for
FTS. Link:
http://www.adobe.com/support/downloads/detail.jsp?ftpID=5542
7)
To the
PATH global system
variable add
path to the
catalog,
where you installed
the plugin.
Default for
this version is:
C:\Program
Files\Adobe\Adobe
PDF iFilter 9
for 64-bit
platforms\bin
8)
From the
page (link)
download a
FilterPackx64.exe
and install
it. Link:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=20109
9)
Now from
SSMS execute the following
procedures:
-sp_fulltext_service
'load_os_resources',1
-sp_fulltext_service
'verify_signature', 0
EXEC
sp_fulltext_service
'update_languages';
-- update language list
EXEC
sp_fulltext_service
'restart_all_fdhosts';
-- restart daemon
reconfigure
with override;
10)
Restart the
server
11)
select document_type,
path from
sys.fulltext_document_types
where document_type
= '.pdf'
-select
document_type,
path from sys.fulltext_document_types
where document_type
= '.docx'
12) Results are OK.
Following is my Table /Index/ catalog script:
CREATE
TABLE dbo.DocumentFilesTest
DocumentId INT
IDENTITY(1,1)
NOT NULL
PRIMARY KEY,
AddDate datetime
NOT NULL,
Name nvarchar(50)
NOT NULL,
Extension nvarchar(10)
NOT NULL,
Description nvarchar(1000)
NULL,
FileStream_Id UNIQUEIDENTIFIER
ROWGUIDCOL NOT
NULL UNIQUE DEFAULT
NEWSEQUENTIALID(),
FileSource varbinary(MAX)
FILESTREAM DEFAULT(0x)
go
--Add default add date for document
ALTER
TABLE dbo.DocumentFilesTest
ADD CONSTRAINT
DF_DocumentFilesTest_AddDate
DEFAULT sysdatetime()
FOR AddDate
EXEC
sp_fulltext_database
'enable'
GO
IF
NOT EXISTS
(SELECT
TOP 1 1 FROM sys.fulltext_catalogs
WHERE name
= 'Ducuments_Catalog_test')
BEGIN
EXEC sp_fulltext_catalog
'Ducuments_Catalog_test',
'create',
'D:\SQL\PDFBlob';
END
--EXEC sp_fulltext_catalog 'Ducuments_Catalog_test', 'drop'
DECLARE
@indexName nvarchar(255)
= (SELECT
Top 1 i.Name
from sys.indexes
i
Join sys.tables
t on
i.object_id
= t.object_id
WHERE t.Name
= 'DocumentFilesTest'
AND i.type_desc
= 'CLUSTERED')
PRINT @indexName
EXEC
sp_fulltext_table
'DocumentFilesTest',
'create',
'Ducuments_Catalog_test',
@indexName
EXEC
sp_fulltext_column
'DocumentFilesTest',
'FileSource',
'add', 0,
'Extension'
EXEC
sp_fulltext_table
'DocumentFilesTest',
'activate'
EXEC
sp_fulltext_catalog
'Ducuments_Catalog_test',
'start_full'
ALTER
FULLTEXT INDEX
ON [dbo].[DocumentFilesTest]
ENABLE
ALTER
FULLTEXT INDEX
ON [dbo].[DocumentFilesTest]
SET CHANGE_TRACKING
= AUTO
ALTER
FULLTEXT CATALOG
Ducuments_Catalog_test REBUILD
WITH ACCENT_SENSITIVITY=OFF;
INSERT
INTO DocumentFilesTest(Extension,
Name,
FileSource)
SELECT
'pdf'
'BOL12006553.pdf'
* FROM
OPENROWSET(BULK
'd:\SQL\PDFBlob\BOL12006553.pdf',
SINGLE_BLOB)
AS BLOB;
GO
INSERT
INTO DocumentFilesTest(Extension,
Name,
FileSource)
SELECT
'docx'
'test.docx'
* FROM
OPENROWSET(BULK
'd:\SQL\PDFBlob\test.docx',
SINGLE_BLOB)
AS Document;
GO
SELECT
d.*
FROM dbo.DocumentFilesTest
d WHERE
Contains(d.FileSource,
'BILL')
Returns nothing. it should come from PDF file
SELECT
d.*
FROM dbo.DocumentFilesTest
d WHERE
Contains(d.FileSource,
'TEST')
Returns from word document as follows:
2 2014-06-04 10:11:41.393 test.docx docx
NULL [BINARY Value] [Binary Value]
Any help is appreciated. Its been a long wait.
Thanks,
Vel
Vel ThavasiHello,
Did you check the fulltext log files for more details about the errors. If the filter isn’t working, there should be errors in the error log file.
The following thread is about similar issue, please refer to:
http://social.msdn.microsoft.com/forums/sqlserver/en-US/69535dbc-c7ef-402d-a347-d3d3e4860d72/sql-server-2008-64bit-fulltext-indexing-pdf-not-working-cant-find-ifilter
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
Full Text Search in PDF file Not Working in SQL Server 2012
OS: Windows Server 2012 @ Azure
DB: SQL Server 2012 SP 1 with Cum Update 6
Filter: OfficeFilter installed, PDFFilter64 11 installed (actually I tried 9 too)
I have done the following steps:-
1. Configure SQL Server Instance to enable FILESTREAM for Transaction-SQL Access (IO Access and Allow Remote Client Access to FileStream data) and restart the instance service.
2. Set Stream Access Level to Full Access and
3. Create Database with file stream folder and set the created database Properties.Options: FileStreamDirectorName = fileContainer and FileStream Non-Transaction Access = Full.
4. Create a FileTable with file director
5. Execute the following scripts to ensure all installed components working. PDF is listed as one of the supported filter.
EXEC sp_fulltext_service @action='load_os_resources', @value=1;
EXEC sp_fulltext_service 'verify_signature', 0 -- don't verify signatures
EXEC sp_fulltext_service 'update_languages'; -- update language list
EXEC sp_fulltext_service 'restart_all_fdhosts';
EXEC sp_help_fulltext_system_components 'filter'
reconfigure with override
6. Copy a few PPTX, DOCX, PDF file into the file director.
7. Search the data by following command. I can PPTX and DOCX files can return right result but PDF is not returned although it contains the searching contents.
SELECT *
FROM dbo.Course
WHERE CONTAINS(file_stream, 'Counsellor');
Any expert advise?
Ant in SGAre you seeing any errors in the SQL Server Error Log, the Windows Application or System logs? How about in the Full-text crawl logging?
Troubleshooting Errors in a Full-Text Population (Crawl)
If your server has a mix of multi-threaded iFilters and single-threaded iFilters, this can cause serious problems with building the full text index. (How do I know this? Well, let's just say that I have suffered as well. And I was shocked!)
The efficiency was greatly increased by this article:
Troubleshooting: Slow Full-Text Indexing Performance Due to Filtering Process
This means changing the threading model for the multi-threaded (e.g. Microsoft Office) filters to be Apartment Threaded. Or perhaps if you are full text indexing PDF files, abandoning the free single-threaded Adobe IFilter and purchasing the FoxIt
(or some other) multi-threaded PDF iFilter would benefit you.
RLF
Maybe you are looking for
-
I'm really dumbfounded on this one and it's driving me bonkers!!!! On some of my music files there is a ! in front of it, if I try to play the song, I get an error message; "The song "_____" could not be used, because the original file could not be f
-
I am no longer able to change songs using my headphones
After updating to iOS 6.0 on my iphone 4S I am no longer able to change songs using the headphone controls and when i double click on the home button it no longer allows me to turn my music on and off without unlocking the screen and going into the m
-
Hi, Can anyone tell me the ways of monitoring jobs within SAP. Please provide me some details.. Thanks.. Swetha.
-
Does anyone know how to find my missing songs? They are listed in my playlist but when I click on them I am told "the song could not be used because the origional file could not be found. Would you like to locate it?" When I click on locate then I
-
Entity Attribute Validation via XML
We have an Entity object with 2 attributes. I'm trying to setup a new validation rule for attribute B that forces it to be GREATER THAN attribute A. It seems that the only way to accomplish this is by using a MethodValidator. The most obvious choice,