Re: osql and isql -- how to test ODBC config?
Tony Esposito <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <197C3C50EA91BF4DBE52558A4007816B435047B1@SN2PRD0202MB131.namprd02.prod.outlook.com> |
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