freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] osql and isql -- how to test ODBC config?
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] osql and isql -- how to test ODBC config?
- Date: Mon, 17 Sep 2012 10:36:19 +0100
It's possible that you are in the wrong database? Or that you don't
have permission for some columns/rows ?
Frediano
2012/9/16 Tony Esposito <Tony.Esposito AT region10.org>:
> More interesting stuff...
> Viewing Sybase Central, the Sybase DBA tool, shows that I have an active
> connection when I use isql. In other words, I am making a successful
> connection to the database with the config I have but for some reason not
> returning rows (or not able to see table due to privs). Yet 'help' can see
> the system catalog tables and return information about the tables I want to
> select from...
>
> -----Original Message-----
> From: Tony Esposito
> Sent: Sunday, September 16, 2012 3:20 PM
> To: FreeTDS Development Group
> Cc: Tony Esposito
> Subject: RE: [freetds] osql and isql -- how to test ODBC config?
>
> Thanks for the suggestions. I unfortunately get no results from 'man
> bsqldb' or man bsqlodbc' from my Linux system. Did you mean to refer to
> 'man' via the web instead?
>
> Did you happen to see my follow-up emails? I can connect and access the
> system tables by virtue of the fact that the 'help' command works in 'isql'
> and returns the table description (see follow-up email I sent last night
> for an example of this).
> What I don't seem to be getting is access to database-specific tables. The
> tool 'isql' shows no rows returned. (-1 rsow count). I tried 'bsqlodbc'
> and it just hangs....
>
> I tried your reference to ASA database in the freetds.conf file and no
> change.
>
> Any help would be greatly appreciated. I greatly appreciate the time you
> have already spent. You are the best!
> '
>
> 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: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
> Sent: Sunday, September 16, 2012 3:01 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] osql and isql -- how to test ODBC config?
>
> On Sun, 16 Sep 2012 03:55:16 +0000
>> I am not familiar with 'bsqldb'.
>> Can I just run it from bash shell prompt?
>
> I think you know the answer to that now, but for the record bsqldb is
> documented as a man page. "man bsqldb" is your friend. :-)
>
> I misled you, though. I meant to suggest you use bsqlodbc (similarly
> documented). I hope it will do a better job of error reporting.
>
> Because you're using Sybase Anywhere I'll draw your attention to a footnote
> in the UG:
> http://www.freetds.org/userguide/freetdsconf.htm#FTN.AEN942.
>
> See also the "ASA database" in freetds.conf. It might be something in that
> neighborhood. I suspect so only because I see nothing wrong with your
> odbc.ini and because osql didn't report a problem.
>
>> 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
>
> Msg 20012 comes from FreeTDS. It means FreeTDS couldn't convert the
> provided name to an ip addreess. The relevant part of the TDSDUMP is
>
>> 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!
>
> What should the "provided name" be? Outside ODBC, servers are known to
> FreeTDS by their servername, a section name in freetds.conf. Yours is
> DB246111 because
>
>> [DB246111]
>> host = 207.235.236.120
>> port = 2638
>> tds version = 5.0
>
> so your command in bsqldb would be
>
> $ bsqldb -S DB246111 -U dba -P sql
>
> just as with tsql.
>
> Inside ODBC, it's too dark to read. (Apologies to Groucho Marx.)
>
> In odbc.ini, the servername property names a freetds.conf servername, and
> the utility (bsqlodbc or isql) is provided with the DSN name (Data Source
> Name, not to be confused with DNS). Yours is txeis because
>
>> [txeis]
>> Driver=FreeTDS
>> Description=Sybase TXEIS Database
>> Servername=DB246111
>> Port=2638
>> TDS_Version=5.0
>
> so your command would be
>
> $ bsqlodbc -S txeis -U dba -P sql
>
> HTH.
>
> --jkl
-
[freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/11/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
James K. Lowden, 09/13/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/13/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
James K. Lowden, 09/15/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/16/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
James K. Lowden, 09/16/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/16/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/19/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/16/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
James K. Lowden, 09/15/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
Tony Esposito, 09/13/2012
-
Re: [freetds] osql and isql -- how to test ODBC config?,
James K. Lowden, 09/13/2012
Archive powered by MHonArc 2.6.24.