freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Bernard Moreton <bernard AT tnauk.org.uk>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] isql connects, tsql does not
- Date: Mon, 30 Jan 2012 11:55:20 +0000
Dear James,
Apologies for the delay - I've been out of office for a week - but thank you for your detailed replies!
With regard to your BTW:
1
The initial response from osql was:
looking for odbc.ini and odbcinst.ini in /etc
reading "/home/mbm/.odbc.ini"
[tnauk] found in "/home/mbm/.odbc.ini"
found this section:
[tnauk]
Description = Live Membership database
Driver = FreeTDS
Servername =
Server = tnauk-sql
Address = 192.168.1.14
Port = 1433
Database = TNAUK
TDS_Version = 8.0
Language = us_english
TextSize =
Domain =
PacketSize =
Trace = yes
TraceFile = /tmp/trace.log
looking for driver for DSN [tnauk]
driver "FreeTDS" found for [tnauk] in .odbc.ini
found driver named "FreeTDS"
FreeTDS is not a readable file
looking for entry named [FreeTDS] in /etc/odbcinst.ini
driver "/usr/lib/odbc/libtdsodbc.so" found for [FreeTDS] in odbcinst.ini
/usr/lib/odbc/libtdsodbc.so is a readable file
Using ODBC-Combined strategy
FreeTDS servername is "Server" (from /home/mbm/.odbc.ini)
looking for [Server] in /home/mbm/.freetds.conf
cannot read "/home/mbm/.freetds.conf"
looking for [Server] in /etc/freetds/freetds.conf
"/etc/freetds/freetds.conf" is a readable file
found this section:
osql.sh: no "host" entry found for [Server] in freetds.conf
2
When Servername is set (same as 'server ='), then
looking for odbc.ini and odbcinst.ini in /etc
reading "/home/mbm/.odbc.ini"
[tnauk] found in "/home/mbm/.odbc.ini"
found this section:
[tnauk]
Description = Live Membership database
Driver = FreeTDS
Servername = tnauk-sql
Server = tnauk-sql
Address = 192.168.1.14
Port = 1433
Database = TNAUK
TDS_Version = 8.0
Language = us_english
TextSize =
Domain =
PacketSize =
Trace = yes
TraceFile = /tmp/trace.log
looking for driver for DSN [tnauk]
driver "FreeTDS" found for [tnauk] in .odbc.ini
found driver named "FreeTDS"
FreeTDS is not a readable file
looking for entry named [FreeTDS] in /etc/odbcinst.ini
driver "/usr/lib/odbc/libtdsodbc.so" found for [FreeTDS] in odbcinst.ini
/usr/lib/odbc/libtdsodbc.so is a readable file
Using ODBC-Combined strategy
FreeTDS servername is "tnauk-sql" (from /home/mbm/.odbc.ini)
looking for [tnauk-sql] in /home/mbm/.freetds.conf
cannot read "/home/mbm/.freetds.conf"
looking for [tnauk-sql] in /etc/freetds/freetds.conf
"/etc/freetds/freetds.conf" is a readable file
found this section:
[tnauk-sql]
host = tnauk-sql
port = 1433
tnauk-sql has address 192.168.1.14
DSN: tnauk
Server's hostname: tnauk-sql
Address: 192.168.1.14
Driver: /usr/lib/odbc/libtdsodbc.so
Attempting connection as tnauknrernard...
+---------------------------------------+
| Connected! |
3
If I take the 'Servername =' line out (it seems redundant, if the name is set up in odbcinst.ini?), then again I get connect, with the servername found from /etc/odbcinst.ini :
looking for odbc.ini and odbcinst.ini in /etc
reading "/home/mbm/.odbc.ini"
[tnauk] found in "/home/mbm/.odbc.ini"
found this section:
[tnauk]
Description = Live Membership database
Driver = FreeTDS
Server = tnauk-sql
Address = 192.168.1.14
Port = 1433
Database = TNAUK
TDS_Version = 8.0
Language = us_english
TextSize =
Domain =
PacketSize =
Trace = yes
TraceFile = /tmp/trace.log
looking for driver for DSN [tnauk]
driver "FreeTDS" found for [tnauk] in .odbc.ini
found driver named "FreeTDS"
FreeTDS is not a readable file
looking for entry named [FreeTDS] in /etc/odbcinst.ini
driver "/usr/lib/odbc/libtdsodbc.so" found for [FreeTDS] in odbcinst.ini
/usr/lib/odbc/libtdsodbc.so is a readable file
"Server" found, not using freetds.conf
FreeTDS servername is "tnauk-sql"
tnauk-sql has address 192.168.1.14
DSN: tnauk
Server's hostname: tnauk-sql
Address: 192.168.1.14
Driver: /usr/lib/odbc/libtdsodbc.so
Attempting connection as tnauknrernard...
+---------------------------------------+
| Connected! |
Does this help?
- I'll work on, and hope to get Aubit4GL connected.
I hope Ubuntu will take on your 0.91 !
Bernard Moreton
IT Director, National Talking Newspapers and Magazines (TNAUK)
Charity registered in the UK 293656
DDI: 01 435 869 316
On 21/01/2012 19:27, James K. Lowden wrote:
On Fri, 20 Jan 2012 13:42:13 +0000
Bernard Moreton<itman AT tnauk.org.uk> wrote:
Found a bug in osql (Ubuntu 11.10 Server), corrected in local copy,
got reasonable results; in consequence set Servername=<NAME>
in .odbc.ini.
Yes, this is fixed in the 0.91.
freetds.conf defines [global] tds version = 7.1 (for SQLServer 2000...
8.00) .odbc.ini sets TDS_version = 8.0
TDSVER not set
TDSDUMP shows
net.c:210:Connecting to 192.168.1.14 port 1433
(TDS version 4.2)
http://www.freetds.org/82/userguide/tdshistory.htm
http://www.freetds.org/82/userguide/choosingtdsprotocol.htm
You almost stumped me, Bernard, because it's been a few years since
0.82. I suspect the problem is that "7.1" is meaningless to 0.82. It
was called 8.0 in those days, before Microsoft released its
documentation.
There are only ever two choices for dealing with invalid input: halt or
ignore. FreeTDS ignores in this case; it falls back to the default.
That would explain why, whatever you do, you see 4.2.
I'll share with you the warning I provide my coworkers: beware of the
Google. When searching for documentation, look on the local machine
*first*, because that is presumably where the documentation for your
particular version is to be found. Using the 0.91 documentation so
handy on the web will mislead you in subtle ways if you're using
0.82. That appears to be what sandbagged you.
BTW, does osql indicate it uses freetds.conf? From your earlier post
I'd guess not.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] isql connects, tsql does not,
jklowden, 01/19/2012
-
Re: [freetds] isql connects, tsql does not,
Bernard Moreton, 01/20/2012
-
Re: [freetds] isql connects, tsql does not,
James K. Lowden, 01/21/2012
- Re: [freetds] isql connects, tsql does not, Bernard Moreton, 01/30/2012
-
Re: [freetds] isql connects, tsql does not,
James K. Lowden, 01/21/2012
- Re: [freetds] isql connects, tsql does not, jklowden, 01/23/2012
-
Re: [freetds] isql connects, tsql does not,
Bernard Moreton, 01/20/2012
Archive powered by MHonArc 2.6.24.