[unixODBC-support] Can't Get isql to Work

Jason Maitlen Jason.Maitlen at OntarioSystems.com
Tue Apr 7 02:09:42 BST 2009


For "isql -v CRMSNEW uid pw":
[S1000][unixODBC][Caché ODBC][State : S1000][Native Code 11001]
[CacheODBC.so]
Socket: Host not found
[ISQL]ERROR: Could not SQLConnect

My /etc/odbc.ini DSN (note I removed the uid and pw) is:
[CRMSNEW]
Driver          = InterSystems ODBC
Protocol        = TCP
Host            = 0.0.0.0
Port            = 1972
Namespace       = CRMSNEW
UID             = 
Password                = 
Description             = CRMSDatabase
Query Timeout           = 0
Static Cursors          = 0
Trace           = yes
TraceFile       = /tmp/isql.log

My /etc/odbcinst.ini entry for the above DSN is:
[InterSystems ODBC]
UsageCount              = 2
Driver          = /usr/cachesys/bin/libcacheodbc.so
Setup           = /usr/cachesys/bin/libcacheodbc.so
SQLLevel                = 1
FileUsage               = 0
DriverODBCVer           = 02.10
ConnectFunctions                = YYN
APILevel                = 1
DEBUG           = 1
CPTimeout               = <not pooled>
TraceFile               = /tmp/isql.log
Trace           = yes

-----Original Message-----
From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Monday, April 06, 2009 7:56 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Can't Get isql to Work

Jason Maitlen wrote:
>
> I've been successfully using PHP to run queries with the odbc 
> functions against a datasource configured in /etc/odbc.ini. I copied 
> this DSN over to a new one and redirected to a different host and DB, 
> but it won't connect. Because of this problem I started messing around 
> with isql and found that neither one of these DSNs worked from isql. 
> Shouldn't any connection that works from PHP using the odbc functions 
> also work with isql since they use the same DSNs and drivers?
>
> *Jason Maitlen*
>
If everything else is the same between PHP and isql, then if one works 
the other will too, if something is different, then maybe not. I guess 
the thing to find is what is different.

You haven't said how isql fails, run with -v to how errors

isql -v dsn user password

-- 
Nick
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support

Attention: This message and all attachments are private and may contain
information that is confidential and privileged. If you received this
message in error, please notify the sender by reply email and delete
the message immediately.


More information about the unixODBC-support mailing list