In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about how to query full-text search in SQL Server, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
1. Change the file name when the file is stored. Configure the index server and associate the index server with MS SQL Server. 3. Modify the SQL statement to add the contents of the full-text query statement to the storage mode of the file in the query condition: in order to facilitate storage and indexing, we store the uploaded file in a directory, in order to ensure that the uploaded file name does not repeat, use GUID as the file name, and associate it with the database record through this GUID. At the same time, the suffix of the file maintains the suffix of the original file, allowing the indexing service to recognize the document. Configure the indexing service to enter the computer management (Computer Management) program (right-click "my computer"-> "manage") And find the indexing service (Index Service) configure indexing service function (1) right select indexing service pop-up a menu (2) Select New- > Catalog (create a new catalog) set the newly added catalog (1) enter the name of the catalog (this name needs to be associated with the database To pay attention to naming, it is assumed that DCSII (2) point Browse enters the selection index service run directory form (3) select the previously created index run directory (anywhere) (4) point to determine the completion of this operation after the catalog creation number You need to add a catalog to the catalog (1) right select the catalog you just created (2) Select New- > Directory (new catalog) create a new index catalog (1) Click Browse to enter the catalog selection page (2) Select the catalog for full-text retrieval (3) confirm the completion of this operation and start the indexing service after the creation (1) start the indexing service (2) the information of the index catalog after the indexing service is started successfully When you see the catalog message, the service has been started successfully. Associate the indexing service with the SQL database: execute the following stored procedure EXEC sp_addlinkedserver Dcs, the name of the connection server, in the SQL query Analyzer (SQL Query Analyer) Use 'Index Server',' MSIDXS' when querying later 'DCSII'-the performance adjustment method for the newly created catalog name indexing service in the indexing service 1 (1) right select indexing service (2) select All Tasks- > Tune Perrformance (3) select user customization (4) Click Customize to enter the performance adjustment form (5) move the properties of Index and Querying to the rightmost (6) Set completion operation performance adjustment method 2 if the server does not need to index the files of the entire system You can stop or delete the System catalog. MSSQL calls to the index server 1. Query the content of the connection server through the sql statement SELECT Q.* FROM OpenQuery (dcs,-- connection server name 'SELECT FileName, Size, DocAuthor, path-- the sql statement FROM SCOPE () WHERE CONTAINS (' serial number and abc'')') AS Q 2 in the connection server. Because SQL statements do not support dynamically entered strings, query strings have to be concatenated in C # code. P. It is not necessary to save the file outside the database to achieve full-text search in the database. The specific solution is to use the secure full-text search function in SQL Server 2000, use the image field to store the file content, and add a new field to store the file type, and then match the two fields when creating a new full-text index item through the enterprise manager. However, in terms of the / rate of the database and the efficiency of database backup and recovery in the future, the design of putting files in the database is not very good.
The above is how to query full-text search in SQL Server. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.