Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 No Catalog on Searching File

Author  Topic 

firman
Starting Member

1 Post

Posted - 2004-09-30 : 19:44:22
I want to search my documents stored and indexed on hard disk with MS-SQL 2000 and MS Indexing Server.

I Got Error Message :

Server: Msg 7320, Level 16, State 2, Line 1
Could not execute query against OLE DB provider 'MSIDXS'.
[OLE/DB provider returned message: There is no catalog. ]


What should I do ?

I have :
- Win 2000 Advanced Server + SQL Server 2000 Enterprise Edition.
- Database named : Test
- SQL Server + SQL Server Agent + Indexing Service Already ran on my system
- IS catalog named : web, system ( default catalog ) and mycatalog (c:\inetpub)

I execute the script from SQL Query Analyzer .
the script is :

1. To add linked server
sp_addlinkedserver FTIndexWeb, 'Index Server', 'MSIDXS', 'default'

2. To create SP
CREATE PROCEDURE proc_search @querystring varchar(255)
as

DECLARE @tsql1 varchar(500), @tsql2 varchar(500), @tsql3 varchar(1000)
--enclose querystring in doublequotes
SET @querystring = '"' + @querystring + '"'
--construct query, pass in querystring
SET @TSQL1 = 'SELECT * ' +
'FROM OPENQUERY (FTIndexWeb, ''SELECT path,filename ' +
'FROM SCOPE('''' "C:\Inetpub\" '''') '
SET @TSQL2 ='WHERE CONTAINS(contents, ''''' + @querystring + ''''') '')'
-- concat everything
SET @tsql3 = @TSQL1 + @TSQL2
--optional
PRINT 'You searched for' + @querystring
-- run query, output row
exec(@TSQL3)

3. To exec SP
exec proc_search 'internet'


ps: I get the script from the internet

   

- Advertisement -