Re: osql and isql -- how to test ODBC config?
Tony Esposito <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <197C3C50EA91BF4DBE52558A4007816B43504854@SN2PRD0202MB131.namprd02.prod.outlook.com> |
Environment (Linux client accessing Windows 'server'): CentOS 5.6 Linux 64-bit FreeTDS 0.91 unixODBC 2.3.1 | | | V Windows XP Professional SP3 32-bit Sybase SQL Anywhere 10 Just some extra info that may be of help. Also, cannot execute any stored procedures -- get same error as when trying to execute SELECTs i.e. SQLRowCount returns -1 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: Thursday, September 13, 2012 10:01 AM To: '[email protected].' Cc: '[email protected]'; '[email protected]' Subject: FW: [freetds] osql and isql -- how to test ODBC config? Importance: High Cc: unixODBC mailing list for assistance. FreeTDS and unixODBC installed on CentOS 5.6. FreeTDS seems to work fine -- see below -- yet while isql connects it does not return data. Yet isql 'help' does return system table data. Any help would be greatly appreciated! Thanks. 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: Thursday, September 13, 2012 9:35 AM To: [email protected] Cc: '[email protected]' Subject: RE: [freetds] osql and isql -- how to test ODBC config? Importance: High Here's what I found out: (1) tsql connects and returns data fine. (2) fisql connects and returns data fine. So it appears the FreeTDS client is setup correctly but... 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): +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> help rsccc.sr_stu_demo +---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------- -----+ | TABLE_QUALIFIER | TABLE_OWNER | TABLE_NAME | COLUMN_NAME | TYPE_ID| TYPE_NAME | PRECISION | LENGTH | SCALE | RADIX | NULLABLE| REMARKS | SS_DOMAIN_ID| COLUMN_ ID | +---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------- -----+ +---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------+------------+------------+-------+-------+---------+---------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------- Please advise. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of James K. Lowden Sent: Thursday, September 13, 2012 1:44 AM To: [email protected] Subject: Re: [freetds] osql and isql -- how to test ODBC config? On Tue, 11 Sep 2012 22:18:39 +0000 Tony Esposito <[email protected]> wrote: > osql: warning: no DNS hostname found for "207.235.236.120" ... > The osql tool stops because of this 'warning' so I never get connected > and therefore never verify my ODBC setup. The script shouldn't stop there because of that. Check the version you're using; revision 1.12 doesn't exit after producing that message on line 342. In fact, the only check remaining after that is that the hostname has an address. If so, it prints what it found out and starts isql. Perhaps something in your environment causes the shell to terminate the script when host(1) returns nonzero status? I'd be interested it hear what you find out. --jkl _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2221 / Virus Database: 2437/5266 - Release Date: 09/13/12