sql server full text search:
I can execute the following to identify a word count: select fulltextcatalogproperty('items_idx', 'UniqueKeyCount') as count; If I execute this locally I get a count as intended. If I include this query in interface code, though, it comes back with a null object instead of the expected value. I'm thinking this is because IUSR (IIS) cannot execute this, or I need to increase permissions; but I'm not certain on what exactly. The connection is working everywhere else in this interface, with every other query (on tables or with containstable full-text queries, etc.). I created a view instead with that exact query to yield the word count 'indirectly', which I thought I could then query instead as IUSR; but this isn't working, either. I cannot find any further info on this; but I would think this isn't impossible or even uncommon to want to display a count of words in the index on a page, for instance. Installed database is developer version 9.00.1399. Thank you for any input!
In case it's important, this issue could be connected to the fact that the interface connection is via ODBC(?). I'm continuing to look for info on this; but I've found nothing yet. Thanks for any input!
even the guest account can issue this query and get results. Is it possible you are issuing it in the wrong database or perhaps misspelling the catalog name? -- Hilary Cotter Director of Text Mining and Database Strategy RelevantNOISE.Com - Dedicated to mining blogs for business intelligence. This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions. Looking for a SQL Server replication book? http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS http://www.indexserverfaq.com [quoted text, click to view] <noel.whelan@gmail.com> wrote in message news:1146351943.242722.295840@j33g2000cwa.googlegroups.com... >I can execute the following to identify a word count: > > select fulltextcatalogproperty('items_idx', 'UniqueKeyCount') as count; > > If I execute this locally I get a count as intended. If I include this > query in interface code, though, it comes back with a null object > instead of the expected value. I'm thinking this is because IUSR (IIS) > cannot execute this, or I need to increase permissions; but I'm not > certain on what exactly. The connection is working everywhere else in > this interface, with every other query (on tables or with containstable > full-text queries, etc.). > > I created a view instead with that exact query to yield the word count > 'indirectly', which I thought I could then query instead as IUSR; but > this isn't working, either. I cannot find any further info on this; but > I would think this isn't impossible or even uncommon to want to display > a count of words in the index on a page, for instance. > > Installed database is developer version 9.00.1399. Thank you for any > input! >
yea I've verified that by just printing the query to be issued, then copy/pasting it in. It yields the value as intended when I do it; but comes back null when executed by the interface code. I've only found one other instance of a person with this issue; and it never came to an explanation of why or what to do.. ;/
If it's worth pointing out, I've verified that but I'm no longer even executing it that way (or trying to) in this code, just querying the view with that query in it, with identical non-effect: the view works, but comes back with null value in page..
Run profiler and make sure its hitting the correct database. -- Hilary Cotter Director of Text Mining and Database Strategy RelevantNOISE.Com - Dedicated to mining blogs for business intelligence. This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions. Looking for a SQL Server replication book? http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS http://www.indexserverfaq.com [quoted text, click to view] <noel.whelan@gmail.com> wrote in message news:1146458104.859148.310800@i40g2000cwc.googlegroups.com... > If it's worth pointing out, I've verified that but I'm no longer even > executing it that way (or trying to) in this code, just querying the > view with that query in it, with identical non-effect: the view works, > but comes back with null value in page.. >
I could dump the trace in a post, though I'm not certain what the value of that would be. It's not explicit (or I'm not viewing it properly) which database is being queried by IUSR when viewing the trace by itself(?). In either case, the ODBC connection is configured with the correct default database. This query is issued 'in between' a few other queries to this database (client login, item count, etc.), consecutively on a page, each of work yield the correct values except for this one. The view that it's querying now (which just includes this fulltextcatalogproperty query) identifies the correct database name, too; but I've gone back and forth a few times between including the query itself and the view in the interface code..
noel.whelan@gmail.com wrote on 1 May 2006 06:09:32 -0700: [quoted text, click to view] > I could dump the trace in a post, though I'm not certain what the value > of that would be. It's not explicit (or I'm not viewing it properly) > which database is being queried by IUSR when viewing the trace by > itself(?). > > In either case, the ODBC connection is configured with the correct > default database. This query is issued 'in between' a few other queries > to this database (client login, item count, etc.), consecutively on a > page, each of work yield the correct values except for this one. The > view that it's querying now (which just includes this > fulltextcatalogproperty query) identifies the correct database name, > too; but I've gone back and forth a few times between including the > query itself and the view in the interface code..
Did you manage to resolve this? I've just noticed that I've got the same problem on my own databases! I've verified the SQL and database are correct - if I change the account name my ASP page runs under then it works correctly, but under the account I need to run the site under I get NULL back for the property. The user account has only SELECT permission on the table that the FTS catalog has been created against, and I can't find any information about other permissions that might be needed to get this working. Dan
Daniel wrote to noel.whelan@gmail.com on Fri, 26 May 2006 15:22:42 +0100: [quoted text, click to view] > noel.whelan@gmail.com wrote on 1 May 2006 06:09:32 -0700: > >> I could dump the trace in a post, though I'm not certain what the value >> of that would be. It's not explicit (or I'm not viewing it properly) >> which database is being queried by IUSR when viewing the trace by >> itself(?). >> >> In either case, the ODBC connection is configured with the correct >> default database. This query is issued 'in between' a few other queries >> to this database (client login, item count, etc.), consecutively on a >> page, each of work yield the correct values except for this one. The >> view that it's querying now (which just includes this >> fulltextcatalogproperty query) identifies the correct database name, >> too; but I've gone back and forth a few times between including the >> query itself and the view in the interface code.. > > Did you manage to resolve this? I've just noticed that I've got the same > problem on my own databases! I've verified the SQL and database are > correct - if I change the account name my ASP page runs under then it > works correctly, but under the account I need to run the site under I get > NULL back for the property. > > The user account has only SELECT permission on the table that the FTS > catalog has been created against, and I can't find any information about > other permissions that might be needed to get this working. >
Actually, I suppose I should point out the the user account is a member of a Windows group, and that group has been given the db_datareader role for the database that the table with the FTS catalog on is located in. Dan
Daniel wrote to Daniel Crichton on Fri, 26 May 2006 15:33:53 +0100: [quoted text, click to view] > Daniel wrote to noel.whelan@gmail.com on Fri, 26 May 2006 15:22:42 +0100: > >> noel.whelan@gmail.com wrote on 1 May 2006 06:09:32 -0700: >> >>> I could dump the trace in a post, though I'm not certain what the value >>> of that would be. It's not explicit (or I'm not viewing it properly) >>> which database is being queried by IUSR when viewing the trace by >>> itself(?). >>> >>> In either case, the ODBC connection is configured with the correct >>> default database. This query is issued 'in between' a few other queries >>> to this database (client login, item count, etc.), consecutively on a >>> page, each of work yield the correct values except for this one. The >>> view that it's querying now (which just includes this >>> fulltextcatalogproperty query) identifies the correct database name, >>> too; but I've gone back and forth a few times between including the >>> query itself and the view in the interface code.. >> >> Did you manage to resolve this? I've just noticed that I've got the same >> problem on my own databases! I've verified the SQL and database are >> correct - if I change the account name my ASP page runs under then it >> works correctly, but under the account I need to run the site under I get >> NULL back for the property. >> >> The user account has only SELECT permission on the table that the FTS >> catalog has been created against, and I can't find any information about >> other permissions that might be needed to get this working. > > Actually, I suppose I should point out the the user account is a member of > a Windows group, and that group has been given the db_datareader role for > the database that the table with the FTS catalog on is located in. > > Dan
OK, I solved it. I had to give permission to the user account to the VIEW DEFINITION securable of the catalog. For some reason db_datareader does not include this permission. Dan
Don't see what you're looking for? Try a search.
|