Skip to Content.
Sympa Menu

freetds - Re: [freetds] Invalid cursor state

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Invalid cursor state
  • Date: Thu, 11 Mar 2010 17:15:04 -0500

On Thu, Mar 11, 2010 at 12:27:30PM -0500, Swapnil Shinde wrote:
> I am using a combination of Snort+unixODBC+freeTDS+mssql. Everything is
> working fine except freeTDS is giving me following error for every query
> after the first query made by the Snort.
>
> *DIAG [24000] [FreeTDS][SQL Server]Invalid cursor state *
>
> After doing some research; I have found that in order to do multiple queries
> at faster rate; one needs to enable MARS (Multiple Active Result Sets)
> parameter in the connection API of mssql.

http://www.freetds.org/faq.html#pending

I don't know exactly what's happening, but if the Snort folks say you *need*
MARS, it won't work with FreeTDS and it's not portable. If anyone on that
team is interested, I'm happy to guide them to the One True TDS Way.

A TDS client must process (or cancel) all results from a query before issuing
a new query. MARS is a Microsoft-only workaround to that basic feature of
the TDS protocol. If we get a patch to make MARS work on FreeTDS, great,
we'll apply it if it's good enough. But I for one see no need.

It's quite easy to program within the one-query-at-a-time paradigm. Anyone
not doing so is cruising for a bruising when the backend is e.g. Sybase.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page