Skip to Content.
Sympa Menu

freetds - Re: [freetds] freetds / IBM UniVerse

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Perry Taylor" <perryft AT hotmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] freetds / IBM UniVerse
  • Date: Thu, 04 Jan 2007 07:35:17 -0700

Thank you for the reply.

I tried setting TDSDUMPCONFIG then running tsql and I do get a log file which shows it successfully found the dsn, host and port...

$ /usr/local/freetds/bin/tsql -S SQL1 -U userid -P password
...

util.c:288:Starting log file for FreeTDS 0.64
on 2007-01-04 09:20:57 with debug flags 0x4fff.
config.c:158:Attempting to read conf files.
config.c:259:...$FREETDSCONF not set. Trying $FREETDS/etc.
config.c:275:...$FREETDS not set. Trying $HOME.
config.c:202:Found conf file '/usr/local/freetds/etc/freetds.conf' (default). Reading section 'SQL1'.
config.c:333:Looking for section global.
config.c:390:... Found section global.
config.c:393:Got a match.
config.c:413:option = 'tds version' value = '4.2'.
config.c:413:option = 'text size' value = '64512'.
config.c:390:... Found section jdbc.
config.c:390:... Found section jdbc_42.
config.c:390:... Found section mypool.
config.c:390:... Found section sql1.
config.c:333:Looking for section SQL1.
config.c:390:... Found section global.
config.c:390:... Found section jdbc.
config.c:390:... Found section jdbc_42.
config.c:390:... Found section mypool.
config.c:390:... Found section sql1.
config.c:393:Got a match.
config.c:413:option = 'host' value = 'devsql1.zirmed.com'.
config.c:440:Found host entry devsql1.zirmed.com.
config.c:443:IP addr is 192.168.16.5.
config.c:413:option = 'port' value = '1433'.
config.c:413:option = 'tds version' value = '8.0'.
config.c:206:...Success.
config.c:578:Setting 'dump_file' to '/tmp/tdsdump.log' from $TDSDUMP.
config.c:487:tds_config_login: client_charset is UTF-8.

However, when I try the connection from within UniVerse I get no log.

Running osql produces some curious info....

$ /usr/local/freetds/bin/osql -S SQL1 -U zmoperations -P z3rm2d.com\&2002
odbc.ini and odbcinst.ini should be in /lib/ld-linux.so.2
looking for DSN [SQL1] in /home/perryt/.odbc.ini
found DSN [SQL1] in /home/perryt/.odbc.ini
[SQL1] not found in "/home/perryt/.odbc.ini"
looking for DSN [SQL1] in /lib/ld-linux.so.2/odbc.ini
cannot read "/lib/ld-linux.so.2/odbc.ini"
osql: error: unable to locate SQL1 in any odbc.ini

My odbc.ini is located in /usr/local/etc. It appears it is not finding it. I'm puzzled by the line "odbc.ini and odbcinst.ini should be in /lib/ld-linux.so.2". Why would we be looking in an so file for the ini's ?

Thanks.

Perry

From: "Lowden, James K" <james.k.lowden AT alliancebernstein.com>
Reply-To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
Subject: Re: [freetds] freetds / IBM UniVerse
Date: Wed, 3 Jan 2007 18:33:03 -0500

> From: Perry Taylor
> Sent: Wednesday, January 03, 2007 2:20 PM
>
> when I try to connect from within our
> IBM/UniVerse database environment I get the following error message...
>
> SQLConnect error: Status = -1 SQLState = S1000 Natcode = 0
> [ODBC] [FreeTDS][SQL Server]Unable to connect to data source
...
> When I enable TDSDUMP and here is what I get...
>
> util.c:288:Starting log file for FreeTDS 0.64
> on 2007-01-03 12:00:49 with debug flags 0x4fff.
> iconv.c:195:names for ISO-8859-1: ISO-8859-1
> iconv.c:195:names for UTF-8: UTF-8
> iconv.c:195:names for UCS-2LE: UCS-2LE
> iconv.c:195:names for UCS-2BE: UCS-2BE
> iconv.c:361:iconv to convert client-side data to the "ISO-8859-1"
character
> set
> iconv.c:514:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
> login.c:209:IP address pointer is empty
> login.c:211:Server SYBASE not found!
> mem.c:519:tds_free_all_results()
>
> I'm completely baffled as to why it would even be looking for a
> server named "SYBASE".

"SYBASE" is the default-default last-ditch name FreeTDS attempts to
connect with if nothing it's passed works. (These days, that's not much
of a feature.) Because your odbc.ini uses 'Server' instead of
'Servername', you're presumably trying to connect to a DSN named "SQL1".
That points you to a machine named 'devsqll'. Is there such a machine
on your network?

I think TDSDUMPCONFIG is your friend here. I think it will show you
what config files are being traversed. Also, current snapshots include
my shell script 'osql', which I wrote to help people debug their ODBC
setup. Please try it and let me know how you fare.

HTH.

--jkl

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

_________________________________________________________________
Find sales, coupons, and free shipping, all in one place!  MSN Shopping Sales & Deals http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639





Archive powered by MHonArc 2.6.24.

Top of Page