Skip to Content.
Sympa Menu

freetds - Re: [freetds] osql and isql -- how to test ODBC config?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tony Esposito <Tony.Esposito AT region10.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc: Tony Esposito <Tony.Esposito AT region10.org>
  • Subject: Re: [freetds] osql and isql -- how to test ODBC config?
  • Date: Sun, 16 Sep 2012 04:23:43 +0000

Sorry - felt I had to top-post the TDSDUMP and TDSDUMPCONFIG file contents.
This is an addendum to the previous email.

TDSDUMP:
log.c:196:Starting log file for FreeTDS 0.91
on 2012-09-15 22:58:37 with debug flags 0x4fff.
config.c:714:Setting 'dump_file' to '/tmp/freetds.log' from $TDSDUMP.
iconv.c:330:tds_iconv_open(0x1122050, UTF-8)
iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:349:setting up conversions for client charset "UTF-8"
iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion
iconv.c:391:preparing iconv for "ISO-8859-1" <-> "ISO-8859-1" conversion
iconv.c:394:tds_iconv_open: done
util.c:331:tdserror(0x1121010, 0x1122050, 20013, 0)
dblib.c:7929:dbperror(0x1121510, 20013, 0)
dblib.c:7981:20013: "Unknown host machine name"
dblib.c:8002:"Unknown host machine name", client returns 2 (INT_CANCEL)
util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:384:tdserror: returning TDS_INT_CANCEL(2)
login.c:423:IP address pointer is empty
login.c:425:Server txeis not found!
dblib.c:1443:dbclose(0x1121510)
dblib.c:258:dblib_del_connection(0x2b4413479fc0, 0x1122050)
mem.c:615:tds_free_all_results()
dblib.c:305:dblib_release_tds_ctx(1)
dblib.c:5882:dbfreebuf(0x1121510)

TDSDUMPCONFIG
log.c:196:Starting log file for FreeTDS 0.91
on 2012-09-15 23:15:09 with debug flags 0x4fff.
config.c:185:Getting connection information for [txeis].
config.c:189:Attempting to read conf files.
config.c:354:... $FREETDSCONF not set. Trying $FREETDS/etc.
config.c:367:... $FREETDS not set. Trying $HOME.
config.c:297:Found conf file '/root/.freetds.conf' (.freetds.conf).
config.c:483:Looking for section global.
config.c:540: Found section db246111.
config.c:554: Reached EOF
config.c:483:Looking for section txeis.
config.c:540: Found section db246111.
config.c:554: Reached EOF
config.c:303:[txeis] not found.
config.c:297:Found conf file '/usr/local/freetds/etc/freetds.conf' (default).
config.c:483:Looking for section global.
config.c:540: Found section db246111.
config.c:554: Reached EOF
config.c:483:Looking for section txeis.
config.c:540: Found section db246111.
config.c:554: Reached EOF
config.c:303:[txeis] not found.
config.c:208:Failed in reading conf file. Trying interface files.
config.c:1040:Looking for server txeis....
config.c:1057:Looking for server in /root/.interfaces.
config.c:931:Searching interfaces file //root/.interfaces.
config.c:956:Couldn't open /root/.interfaces.
config.c:1077:Looking for server in /usr/local/freetds/interfaces.
config.c:931:Searching interfaces file /usr/local/freetds/interfaces.
config.c:956:Couldn't open /usr/local/freetds/interfaces.
config.c:1111:Setting 'ip_port' to 4000 as a guess.
config.c:210:Failed to find [txeis] in configuration files; trying 'SYBASE'
instead.
util.c:331:tdserror(0x1cb48010, 0x1cb49050, 20012, 0)
dblib.c:7929:dbperror(0x1cb48510, 20012, 0)
dblib.c:7981:20012: "Server name not found in configuration files"
dblib.c:8002:"Server name not found in configuration files", client returns 2
(INT_CANCEL)
util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:384:tdserror: returning TDS_INT_CANCEL(2)
config.c:714:Setting 'dump_file' to '/tmp/freetds.log' from $TDSDUMP.
config.c:224:Final connection parameters:
config.c:225: server_name = txeis
config.c:226: server_host_name =
config.c:227: ip_addr =
config.c:228: instance_name =
config.c:229: port = 4000
config.c:230: major_version = 5
config.c:231: minor_version = 0
config.c:232: block_size = 0
config.c:233: language = us_english
config.c:234: server_charset = iso_1
config.c:235: connect_timeout = 0
config.c:236: client_host_name = empower01
config.c:237: client_charset = UTF-8
config.c:238: app_name = bsqldb
config.c:239: user_name = dba
config.c:242: library = DB-Library
config.c:243: bulk_copy = 0
config.c:244: suppress_language = 0
config.c:245: encrypt level = 0
config.c:246: query_timeout = 0
config.c:249: database =
config.c:250: dump_file = /tmp/freetds.log
config.c:251: debug_flags = 0
config.c:252: text_size = 0
config.c:253: broken_dates = 0
config.c:254: emul_little_endian = 0
config.c:255: server_realm_name =

Not convinced the odbc.ini file is setup correctly. When changing [ ]
reference to DB24611 in odbc.ini, bsqldb hangs but at least it finds the IP
address.
TDSDUMPCONFIG file ( below ) looks better except I don't see a database
specified.

log.c:196:Starting log file for FreeTDS 0.91
on 2012-09-15 23:19:28 with debug flags 0x4fff.
config.c:185:Getting connection information for [DB246111].
config.c:189:Attempting to read conf files.
config.c:354:... $FREETDSCONF not set. Trying $FREETDS/etc.
config.c:367:... $FREETDS not set. Trying $HOME.
config.c:297:Found conf file '/root/.freetds.conf' (.freetds.conf).
config.c:483:Looking for section global.
config.c:540: Found section db246111.
config.c:554: Reached EOF
config.c:483:Looking for section DB246111.
config.c:540: Found section db246111.
config.c:543:Got a match.
config.c:565: host = '207.235.236.120'
config.c:595:Found host entry 207.235.236.120.
config.c:599:IP addr is 207.235.236.120.
config.c:565: port = '2638'
config.c:565: tds version = '5.0'
config.c:788:Setting tds version to 5.0 (0x500) from $TDSVER.
config.c:565: dump file = '/usr/freetdsdump.log'
config.c:565: client charset = 'UTF-8'
config.c:613:tds_parse_conf_section: client charset is UTF-8.
config.c:554: Reached EOF
config.c:301:Success: [DB246111] defined in /root/.freetds.conf.
config.c:714:Setting 'dump_file' to '/tmp/freetds.log' from $TDSDUMP.
config.c:224:Final connection parameters:
config.c:225: server_name = DB246111
config.c:226: server_host_name = 207.235.236.120
config.c:227: ip_addr = 207.235.236.120
config.c:228: instance_name =
config.c:229: port = 2638
config.c:230: major_version = 5
config.c:231: minor_version = 0
config.c:232: block_size = 0
config.c:233: language = us_english
config.c:234: server_charset = iso_1
config.c:235: connect_timeout = 0
config.c:236: client_host_name = empower01
config.c:237: client_charset = UTF-8
config.c:238: app_name = bsqldb
config.c:239: user_name = dba
config.c:242: library = DB-Library
config.c:243: bulk_copy = 0
config.c:244: suppress_language = 0
config.c:245: encrypt level = 0
config.c:246: query_timeout = 0
config.c:249: database =
config.c:250: dump_file = /tmp/freetds.log
config.c:251: debug_flags = 0
config.c:252: text_size = 0
config.c:253: broken_dates = 0
config.c:254: emul_little_endian = 0
config.c:255: server_realm_name =
'
Please advise and thanks again in advance. FYI ( In Sybase (not FreeTDS)
lingo, for my environment, the Sybase server is 'txeis' and Sybase database
is 'DB246111' that I am trying to connect to. It gets confusing to me when
the name 'server' or 'servername' is used by different products to mean
different things but not much I can do about it :-) )


Tony Esposito
ETL Developer
Information Services Programming
Region 10 Education Service Center
400 E Spring Valley Rd
Richardson, TX 75081
(Ph) 972-348-1284
(Fax) 972-348-1285
Reveal Data Analytics



-----Original Message-----
From: Tony Esposito
Sent: Saturday, September 15, 2012 10:55 PM
To: FreeTDS Development Group
Cc: Tony Esposito
Subject: RE: [freetds] osql and isql -- how to test ODBC config?



-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Saturday, September 15, 2012 10:23 AM
To: freetds AT lists.ibiblio.org
Subject: Re: [freetds] osql and isql -- how to test ODBC config?

On Thu, 13 Sep 2012 14:35:03 +0000
Tony Esposito <Tony.Esposito AT region10.org> wrote:

>>(1) tsql connects and returns data fine.
>> (2) fisql connects and returns data fine.
>>
>> So it appears the FreeTDS client is setup correctly but...
>One cannot generalize from tsql to odbc because ODBC requires additional
>setup. "tsql servername" and "isql servername" may use different servers and
>even different copies of FreeTDS.

>> isql connects yet returns no data when doing a SELECT (see error
>> below):
>>
>> isql -v txeis dba sql
>> +---------------------------------------+
>> | Connected! |
>> | |
>> | sql-statement |
>> | help [tablename] |
>> | quit |
>> | |
>> +---------------------------------------+
>> SQL> select * from rsccc.sr_stu_demo
>> SQLRowCount returns -1
>> SQL>
>>
>>Yet isql will return system table information via the 'help' command
>>(see SQL below):
>
>No, the reply you quoted showed column headers only, no data.
>
>> Please advise.
>
>Your freetds.conf and odbc.ini look correct to me. I think isql is
>swallowing an error from the server. I would try the same query using
>bsqldb using TDSDUMP viz:
>
> $ TDSDUMP=stdout bsqldb -S txeis -U dba -P sql

Tried the following from the Linux shell prompt: bsqldb -S txeis -U dba -P
sql And got the following error message:
bsqldb: Msg 20012, Level 2
Server name not found in configuration files

bsqldb: Msg 20013, Level 2
Unknown host machine name

>HTH.
>
>--jkl
>
>P.S. Please don't top-post. Inline replies such as I have used here make
>the thread of the conversation easier for others to follow.
>_______________________________________________
>FreeTDS mailing list
>FreeTDS AT lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds

Please advise ... I am not familiar with 'bsqldb'. Can I just run it from
bash shell prompt?
Thank you for your time and effort. :-)

Tony Esposito
ETL Developer
Information Services Programming
Region 10 Education Service Center
400 E Spring Valley Rd
Richardson, TX 75081
(Ph) 972-348-1284
(Fax) 972-348-1285
Reveal Data Analytics




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2221 / Virus Database: 2437/5270 - Release Date: 09/15/12





Archive powered by MHonArc 2.6.24.

Top of Page