[unixODBC-support] Huge problems connecting to a DB2 database.

Nick Gorham nick at lurcher.org
Sun Sep 19 01:47:18 BST 2010


  On 19/09/2010 00:19, Nicklas Börjesson wrote:
>
> Thanks, and hi again!
>
> The strace doesn't tell much, it mostly reported the writes to sql.log . It has some problems finding its locale, but that shouldn't be fatal, right? Is there something special I should look for, some extra strace option, perhaps?
>
> However, I realised that this was in /tmp/sql.log:
>
> [ODBC][4457][1284849292.957456][SQLConnect.c][3654]
> Entry:
> Connection = 0x1fb2810
> Server Name = [FS01DB2][length = 7 (SQL_NTS)]
> User Name = [NULL]
> Authentication = [NULL]
> UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
>
> Server name is for some reason the same as the name of the DSN, which is not the same as the server FQDN.
> And user name and authentication is null.
>
Its ok, the arg is called server name as thats what the original MS docs 
called it, but it is actually the DSN name, likewise the user and 
password is what the app (isql) is passing to the driver manager. The 
driver takes the server name and looks up the user and password (and any 
other info) from the ini file.
> As you maybe saw before, I specify username in the DSN.
>
> Maybe my .ini-files have some strange fault in them, after all, I don't know.
>
Maybe email me the strace log I will see if there is anything obvious. 
nick at lurcher.org will find me.
> Warm regards
> Nicklas
>
> PS.
> Haven't gotten the db2 cli to work at all yet. A somewhat cumbersome utility, it feels like.
> DS.
>
Well, when I was trying the db2 driver years ago, if the db2 app didnt 
work the odbc driver wouldn't. It involved cataloging the database you 
were connecting through and referring as the instance.

-- 
Nick


More information about the unixODBC-support mailing list