[unixODBC-support] DSN=... notation not accepted

Andreas Buschka kontakt at andreas-buschka.de
Wed Oct 29 15:59:33 GMT 2008


Hello,

I currently have the problem that unixODBC does not same to accept a DSN=... notation. This causes Oracle dg4odbc (Oracle 11g) not to work right now.

>From the Oracle db4odbc trace file:
##>Connect Parameters (len=..)<##
## DSN=CUSTOMERDB01;
#! UID=MYUSERNAME;
#! PWD=*
hgocont, line 1903: calling SqlDriverConnect got sqlstate

The problem is that specifying "CUSTOMERDB01" as DSN works file, where "DSN=CUSTOMERDB01;UID=MYUSERNAME;PWD=MYPASSWORD" does not:

 isql -v "DSN=MYCUSTOMERDB01;UID=MYUSERNAME;PWD=MYPASSWORD"
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
>From the unixODBC log file:
[ODBC][14489][SQLConnect.c][3549]
                Entry:
                        Connection = 0x82d4130
                        Server Name = [DSN=MYCUSTOMERDB01;UID=MYUSERNAME;PWD=MYPASSWORD][length = xx
 (SQL_NTS)]
                        User Name = [NULL]
                        Authentication = [NULL]
It looks like the DSN is not parsed at all.

while specifying just the DSN name works:
isql -v MYCUSTOMERDB01 MYUSERNAME MYPASSWORD
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
My environment is:
Linux RHEL5, unixODBC unixODBC-2.2.11-7.1, Oracle 11g 11.0.7, Informix Connect 3.50

I have created a data source for accessing an Informix SQL database like this:

odbc.ini:
[CUSTOMERDB01]
Driver=Informix
Server=informix_server_name_net
Database=customerdb
CLIENT_LOCALE=de_DE.57391
DB_LOCALE=de_DE.57391
TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so
[ODBC]
TraceFile = /tmp/sql.log
Trace = Yes
and defined the driver in odbcinst.log like this:
[Informix]
Description=Informix
Driver=/opt/IBM/informix/lib/cli/libifcli.so
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.50
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y
Trace               = Yes
TraceFile           = sql.log
Can anyone help?

Greetings,
Andreas Buschka

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20081029/f046f4d2/attachment.html>


More information about the unixODBC-support mailing list