Re: Dreaded "Server SYBASE not found!" question [SOLVED]

"Nelson, Erik - 2" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Okay, poked at it a bit more and tracked it down to a call to
SQLGetPrivateProfileString.  Ran ldd on libtdsodbc.so and found that it
was pointing towards the system libodbcinst.so.1 instead of the correct
one.  I re-configured freetds with --with-unixodbc pointing to the right
place and everything was fine.  I was pretty sure I had configured it
correctly in the first place, but the evidence shows not.  Sorry for the
noise.


Nelson, Erik - 2 wrote:
> I'm not sure if this is a unixODBC question or a freetds question,
> but starting here.  I can connect to the server just fine with tsql,
> but have problems with isql.  It appears as if neither the  
> connection->ip_addr nor the are connection->server_name filled in in
> tds_connect() in freetds' login.c
> 
> There's an outstanding todo in login.c to open the log file prior to
> tds_set_server() where "SYBASE" is being set in to
> connection->server_name, but it's not at all clear why the server
> name/IP aren't being set correctly since the server info is clearly
> being found in freetds.conf.  My combined osql/TDSDUMP dump is below. 
> 
> I only recently added the Servername to my odbc.ini, directing the
> freetds.conf lookup.  The result is the same both with and without
> the Servername (osql finds the correct info either way, but it
> doesn't seem to get passed in to freetds)   
> 
> Any assistance would be appreciated.
> 
> ******begin debug output***********
> /modleng/usr/bin/osql -S Hiruko -U CFC\\enelson2 -P xxxxxx looking
>         for odbc.ini and odbcinst.ini in /modleng/usr/etc reading
> "/home/modleng/.odbc.ini" [Hiruko] not found in
>         "/home/modleng/.odbc.ini" reading "/modleng/usr/etc/odbc.ini"
> [Hiruko] found in "/modleng/usr/etc/odbc.ini"
> found this section:
>         [Hiruko]
>         Driver  =       FreeTDS
>         Description     =       DataDirect 5.1 SQL Server Wire
>         Protocol Servername      =       Hiruko
>         Server  =       Hiruko
>         Port    =       1433
>         AnsiNPW =       Yes
>         Database        =       Hydra
>         UID     =       sasaixbank
>         QuotedId        =       Yes
>         TDS_Version     =       8.0
> 
> looking for driver for DSN [Hiruko]
> driver "FreeTDS" found for [Hiruko] in odbc.ini found driver named
> "FreeTDS" 
> FreeTDS is not a readable file
> looking for entry named [FreeTDS] in /modleng/usr/etc/odbcinst.ini
> driver "/modleng/usr/lib/libtdsodbc.so" found for [FreeTDS] in
> odbcinst.ini /modleng/usr/lib/libtdsodbc.so is a readable file Using
> ODBC-Combined strategy FreeTDS servername is "Hiruko" (from
> /modleng/usr/etc/odbc.ini) looking for [Hiruko] in
> /home/modleng/.freetds.conf cannot read "/home/modleng/.freetds.conf"
> looking for [Hiruko] in /modleng/usr/etc/freetds.conf
>         "/modleng/usr/etc/freetds.conf" is a readable file found this
>                 section: [Hiruko] host = hiruko.ten-net.net
>                 port = 1433
>                 tds version = 8.0
> hiruko.ten-net.net has address 10.148.18.170
> 
>                            DSN: Hiruko
>              Server's hostname: hiruko.ten-net.net
>                        Address: 10.148.18.170
>                         Driver: /modleng/usr/lib/libtdsodbc.so
> 
> Attempting connection as CFC\enelson2...
> log.c:190:Starting log file for FreeTDS 0.82
>         on 2009-12-11 10:37:40 with debug flags 0x4fff.
> iconv.c:197:names for ISO-8859-1: ISO-8859-1 iconv.c:197:names for
> UTF-8: UTF-8 iconv.c:197:names for UCS-2LE: UCS-2LE iconv.c:197:names
> for UCS-2BE: UCS-2BE iconv.c:363:iconv to convert client-side data to
> the "ISO-8859-1" character set  
> iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
> login.c:405:IP address pointer is empty
> login.c:407:Server SYBASE not found!
> mem.c:563:tds_free_all_results()
> error.c:574:SQLError((nil), 0x520480, (nil), 0x7fbfffe510,
> 0x7fbfffdecc, 0x7fbfffe300, 513, 0x7fbfffded2)
> error.c:510:_SQLGetDiagRec(2, 0x520480, 1, 0x7fbfffe510,
> 0x7fbfffdecc, 0x7fbfffe300, 513, 0x7fbfffded2)
> error.c:574:SQLError((nil), 0x520480, (nil), 0x7fbfffe510,
> 0x7fbfffdecc, 0x7fbfffe300, 513, 0x7fbfffded2)
> error.c:510:_SQLGetDiagRec(2, 0x520480, 1, 0x7fbfffe510,
> 0x7fbfffdecc, 0x7fbfffe300, 513, 0x7fbfffded2)
> odbc.c:3734:SQLFreeConnect(0x520480)       
> odbc.c:3706:_SQLFreeConnect(0x520480)
> odbc.c:3757:SQLFreeEnv(0x51f060)
> odbc.c:3744:_SQLFreeEnv(0x51f060)
> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
> [ISQL]ERROR: Could not SQLConnect
> 
> 
> Erik
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.