[freetds] Version 1.00.15 select @@spid
freddy77 at gmail.com
Fri Sep 23 03:38:13 EDT 2016
2016-09-21 14:44 GMT+01:00 mlhjr61 . <mlhjr61 at gmail.com>:
> Hello Users group,
> I use freetds with perl DBI in scripts to connect to an application called
> IBM Tivoli Netcool/Omnibus (versions 7.3.1, 7.4, and 8.1) . Freetds
> version 0.91 works fine with all of them. I am installing new servers and
> downloaded the latest freetds version 1.00.15 and now am unable to run
> queries. Error is the following when I connect:
> "ERROR=Parse failure on line 1 of statement 'select @@spid ', at or
> near '@'"
> Connection (in freetds log) is successful, but the select statement above
> causes failure).
> Is this something that can be disabled?
> ./tsql -C
> Compile-time settings (established with the "configure" script)
> Version: freetds v1.00.15
> freetds.conf directory: /usr/local/etc
> MS db-lib source compatibility: no
> Sybase binary compatibility: no
> Thread safety: yes
> iconv library: yes
> TDS version: auto
> iODBC: no
> unixodbc: yes
> SSPI "trusted" logins: no
> Kerberos: no
> OpenSSL: yes
> GnuTLS: no
> MARS: no
Looks like Tivoli is using TDS then but it's not a sql server.
The "select @@spid" is a query accepted by any sql server and was
introduced to get the SPID variable.
Probably it would be possible to understand server type and avoid
trying to get the SPID that way of just replace with a dummy value.
Can you send the log (privately if you prefer) ?
More information about the FreeTDS