SQL Service 2000 full-text search

xiaoxiao2021-03-05  48

The finishing of the full text search: 1. Start the Microsoft Search service start menu -> SQL program group -> Service Manager -> Draw Basket -> Microsoft Search Service -> Start it --- usually in service. 2. ../Microsoft SQL Server / MSSQL / FTDATA / SQLSERVER / CONFIG / Directory built a non-empty noise.chs file non-empty NOISE.CHS file, and some people say that it is empty noise.chs file. - Usually when the folder has been made from this document and documentation 3. Establish an environment to open query analyzer -> Execute the following scripts: ----------------------------------- ------ Create Database Test --- Create Test Database Use Test --- Select Test Database Create Table Dali (ID Int Not Null Primary Key, MyImage Image, Filetype Varchar (255), FileNMAE VARCHAR (255)) --- Create a Dali Table - Dali Table ID, MyImage, FileType three columns must be, because the image column index is to be indexed, you must have a primary key column, a image column, a column sp_fulltext_database file with the file type. enable '- to enable full-text indexing database sp_fulltext_catalog' My_FullDir ',' create '--- create a full-text catalog named declare @Key sysname My_FullDif of; select @ Key = c.name from syscolumns a, sysconstraints b, sysobjects c where a .id = Object_ID ('dali') and a.name = 'id' and a.id = B.ID and b.constid = C.ID and c.Name Like 'pk%' exec sp_fulltext_table 'dali', 'Create ',' My_fulldir ', @ key ---- These two sentences are for full-text indexes, tag tables

Sp_fulltext_column 'Dali', 'MyImage', 'Add', 0x0804, 'FileType' - This sentence is the specified MyImage list as a full-text search, FileType is the type column 4, put a web file that extends an extension HTM under the C drive INDEX.HTML5. Insert the data to establish the following stored procedure -------------------------------------------------------------------------------------------------------------------- ------- Create Procedure SP_Textcopy @srvname Varchar (30), @login varchar (30), @password varchar (30), @tbname varchar (30), @colname varchar (30 @Filename varchar (30), @whereclause var (40), @direction char (1) AS / * This is to insert files into the database using the TextCopy Tool, if there is a front desk development tool to insert files, Here is to demonstrate * / declare @exec_str varchar (255) select @ exec_str = 'textcopy / s' @ srvname '/ u' @ login '/ p' @ password '/ d' @ dbname '/ t' @ TBNAME '/ C' @ colname '/ w "' @ whereclause '" / f "' @ filename '" /' @ DirectionExec master..xp_cmdshell @ EXEC_STR6. INSERT DALI VALUES (1,0x, 'htm', 'page') sp_textcopy 'Gaolong', 'Gaolong1', '831001', 'Test', 'DALI', 'MyImage', 'C: /index.html', 'WHERE ID = 1', 'I' The parameters are: server name (not instance name), user name, password, database name, table name, image name, path, file name, condition (you must guarantee only choice One line), here is common problems: (1) The results show that Output 'TextCopy' is not internal or external commands, nor is the runable programs or batch files. NULL Solutions: To the C: / Program Files / Microsoft SQL Server / MSSQL / BINN Directory Textcopy.exe to: C: / Program Files / Microsoft SQL Server / 80 / Tools / BINN (2) Result Shows DB- Library Error 10004: Unable to connect: SQL Server is not available or does not exist.

Didn't find the specified SQL Server. Error: Could Not Connect To SQL Server 'PR' Solution: The relevant login parameters of the server are not correct, and can be adjusted according to the actual situation. 7. Filled full-text index sp_fulltext_table 'dali', 'start_full'8. Test Select * from dali where contacts (MyImage, 'Title') is over the query analyzer, you can also use other methods to operate: 1. Open the Northwind database, right-click Products table, select "Full-text Search", "in Table Define full-text indexes, create a full-text directory. In the Full-Text Index Wizard, select the column you need full-text query criteria (you can be a text or image), we choose ProductName and QuantityPerUnit columns. Then enter the next step, enter a new directory Procatalog, click Next. In the fill schedule, we do not establish a fill schedule. Then, "Next", full into full-text index pole. After completing, we can see that in the "full-text catalog", there is more full-text directory Procatalog. The right key Procatalog property can see its status, table, and scheduling. 2. Right-click the full-text directory Procatalog, "Start full fill", and the system will appear "full-text directory fill success". 3. At this time, we can use Transact-SQL to retrieve the full text, we use Contains, Freetext and other predicates.

Start full-text search process: 1) Start the Microsoft Search service start menu -> SQL program group -> service manager -> drop basket-> Microsoft Search Service -> Start it 2) sp_fultext_database 'enable' - Full-text index Enable Database 3) sp_fulltext_table 'dali', 'start_full' fill full-text index then can start retrieving.

转载请注明原文地址:https://www.9cbs.com/read-32986.html

New Post(0)