[freetds] Invalid cursor state

Swapnil Shinde swapnil34 at gmail.com
Thu Mar 11 19:13:14 EST 2010

Got it. Snort developers should take care of it in next release.

Thanks for the prompt reply.


On Thu, Mar 11, 2010 at 5:15 PM, <jklowden at schemamania.org> wrote:

> 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

More information about the FreeTDS mailing list