Custom StopWord List In SQL Server 2005 Full-Text-Search - sql-server-2005

Is there anyway to add some custom stop words to SQL Server 2005?

I found the answer:
On SQL Server 2005:
On SQL 2005 they have the concept of "noise word lists". These are essentially the same thing, but they're stored as text files in the file system. These files have names like "noiseenu.txt" (U.S. English noise word text file) and are located in a subdirectory of your SQL Server instance directory (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\, for instance). You can edit it with any text editor and save again. I don't recall whether or not you need to bounce the service afterwards on 2005 (don't recall if the noiseword list is cached in memory, but you may as well bounce it to be sure). Then you have to rebuild your full-text indexes.
On SQL Server 2008:
You can create a custom stopword list on SQL 2008 the server will remove the stopwords at index time and when it parses your full-text search queries. All you have to do is specify that your full-text index use the custom stoplist.

Related

Linking a SQL Server table to a text file without SSIS

I want to link a SQL Server table to a text file so that any changes made to the text file, such as creating, deleting, or updating a row, are reflected in the SQL Server table.
The best way to do this appears to be SSIS, but I know that this is only for certain versions of SQL Server. I don't appear to have one of these versions, and this is not likely to change anytime soon.
Is it possible to achieve this result without SSIS?
Update: I am working with SQL Server 2016 Express.
Example of text file:
ITEM NUMBER ;LINE ;LOCATION
1234432 ;SHIPPING ;505R13201C

Full text index population stuck at Starting on SQL 2012

I have a sql server 2012 box that hosts hundreds of databases. All databases use full text indexing. The indexing has stopped working.
executing this query:
SELECT status_description
FROM sys.dm_fts_index_population
returns status_description equal to Starting for all databases where there has been recent activity.
I created a new database and created a full text index. It has the same problem, the population is not completing.
What can be the cause? Can I somehow reset the full text index service without restaring SQL Server service itself?

Restoring SQL Server 2000 database on a 2008 R2 is creating a new logical file

I have a database on SQL Server 2000. There are only two logical files in the PRIMARY file group: the data file and the log file. However, when restoring the database to SQL Server 2008 R2, there is now a new logical file named ftrow_Table1Field1 with a file name ftrow_Table1Field1{GUID}.ndf. (I've replaced the actual table, field name, and GUID for simplicity.) The path to the .ndf file is MSSQL10_50.MSSQLSERVER\MSSQL\FTData\.
I did not create this logical file, nor did I enable full-text search on the database. Field1 was originally a TEXT data type in SQL Server 2000, which I've changed via T-SQL to a VARCHAR(MAX) column. This is also not the only column I've converted from TEXT to VARCHAR(MAX).
Can anyone shed some light on what is going on here?
EDIT: I did another restore without running my massive T-SQL scripts for the next software release. Direct from the SQL Server 2000 backup, it creates this file. Looking at the Properties of the field in SSMS, it says Full Text is False. The data type is TEXT. This is not the only TEXT field in the database.
Okay. I figured it out. The SQL 2000 database thought there was a full-text index enabled on the field, but it wasn't really enabled. This carried over to SQL 2008 R2 during the restore, because R2 restored in SQL 2000 compatibility mode and preserved the presumed .NDF. I just removed that file from the file group, and it's good. Also, R2 will create full-text indexes in the .MDF itself, as opposed to creating an .NDF.

Fulltext Search in SQL Server 2008 Step by step

How to get started with Fulltext Search in SQL Server 2008
read these links:
SQL SERVER – 2008 – Creating Full Text Catalog and Full Text Search
Using Full Text Search in SQL Server 2008
Setting Up Full Text Search: A Step-by-step Guide
Full-Text Search (SQL Server)
SQL Server 2008 Full Text Search Best Practices from the SQL CAT Team
I would add those links from Simple Talk's web site:
Understanding Full-Text Indexing in SQL Server
SQL Server Full Text Search Language Features
SQL Server Full Text Search Language Features - Part 2

How to remove "Server name" items from history of SQL Server Management Studio

When trying to connect to a server in Management Studio (specifically 2008), there is a field where you enter the Server name. That field also has a drop-down list where it shows a history of servers that you have attempted to connect to.
How to remove an individual item
from that history?
How to remove an
item from the Login field history
for each Server name?
As of SQL Server 2012 you no longer have to go through the hassle of deleting the bin file (which causes other side effects). You should be able to press the delete key within the MRU list of the Server Name dropdown in the Connect to Server dialog. This is documented in this Connect item and this blog post.
Note that if you have multiple entries for a single server name (e.g. one with Windows and one with SQL Auth), you won't be able to tell which one you're deleting.
Here is simpliest way to clear items from this list.
Open the Microsoft SQL Server Management Studio (SSMS) version you want to affect.
Open the Connect to Server dialog (File->Connect Object Explorer, Object Explorer-> Connect-> Database Engine, etc).
Click on the Server Name field drop down list’s down arrow.
Hover over the items you want to remove.
Press the delete (DEL) key on your keyboard.
there we go.
For SQL 2005, delete the file:
C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
For SQL 2008, the file location, format and name changed:
C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
How to clear the list:
Shut down all instances of SSMS
Delete/Rename the file
Open SSMS
This request is registered on Microsoft Connect
Over on this duplicate question #arcticdev posted some code that will get rid of individual entries (as opposed to all entries being delete the bin file).
I have wrapped it in a very ugly UI and put it here: http://ssmsmru.codeplex.com/
For SQL Server 2012 Management Studio, this file has moved. It is now located at:
C:\Users\<username>\AppData\Roaming\Microsoft\
SQL Server Management Studio\11.0\SqlStudio.bin
In Windows Server 2008 standard with SQL Express 2008, the "SqlStudio.bin" file lives here:
%UserProfile%\Microsoft\Microsoft SQL Server\100\Tools\Shell\
Here is an easy way.
Open the connection window, click on the Server name dropdown, and hover over the connection string you want to delete, then press delete.
Delete the file from above path: (Before delete please close SSMS)
File location path for the users of SQL Server 2005,
C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
File location path for the users of SQL Server 2008,
Note: Format Name has been changed.
C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
File location path for the users of Server 2008 standard/SQL Express 2008
C:\Documents and Settings\%USERNAME%\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
File location path for the users of SQL Server 2012,
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin
File location path for the users of SQL Server 2014,
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin
Note: In SSMS 2012 (Version 10.50.1600.1 OR Above), ow you can remove the server name by selecting it from dropdown and press DELETE.
In SSMS 2012 there is a documented way to delete the server name from the "Connect to Server" dialog. Now, we can remove the server name by selecting it in the dialog and pressing DELETE.
File SqlStudio.bin actually contains binary serialized data of type "Microsoft.SqlServer.Management.UserSettings.SqlStudio".
Using BinaryFormatter class you can write simple .NET application in order to edit file content.
From the Command Prompt (Start \ All Programs \ Accessories \ Command Prompt):
DEL /S SqlStudio.bin
This is the correct way of doing it
http://blogs.msdn.com/b/managingsql/archive/2011/07/13/deleting-old-server-names-from-quot-connect-to-server-quot-dialog-in-ssms.aspx
For Windows Vista and SQL Server 2005,
Delete this file, or open it with the Notepad and clear the server names that you want Clear from the history
%UserProfile%\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
C:\Users\\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell
Rather than deleting or renaming this file:
Close SQL Server Management Studio.
Find the appropriate file (see the other posts).
Open the .bin in a text/hex editior like NotePad++.
Search for the name of one of the servers and identify the line number.
Make a copy of the .bin/.dat file.
Delete that line. Make sure you delete the entire line, it's possible if you have many the line could wrap.
Open SQL Server Management Studio. Your dropdown will be blank.