[unixODBC-support] RE: DB2 connect issue

Matthew Beck matthew.beck at pmigroup.com
Sun Nov 6 18:27:39 GMT 2005


Next error:

bash-2.03$ ./isql -v DB uid pwd
[ISQL]ERROR: Could not SQLAllocConnect

I'm having difficulty tracking down a solution on this one.

RE: last error: 

DB2INSTANCE is set.  Managed to get rid of that error using this doc
(changed sqltypes.h and recompiled unixODBC):

http://www-1.ibm.com/support/docview.wss?rs=71&context=SSEPGG&q1=Driver%
27s+SQLAllocHandle+on+SQL_HANDLE_DBC+failed&uid=swg1IY50047&loc=en_US&cs
=utf-8&lang=en

unixODBC Driver Manager v 2.2.3 64bit fails to connect to a DB2
UDB v8.1 FP3 datasource with following
.
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on
SQL_HANDLE_DBC failed
[ISQL]ERROR: Could not SQLConnect

The problem is caused by the way SQLHANDLE is defined.
The data type is defined differently in DB2 and unixODBC
include files:
.
- DB2 defines SQLHANDLE as int in include/sqlcli.h and
include64/sqlcli.h
- UnixODBC defines SQLHANDLE as void * in include/sqltypes.h



Matthew Beck
PMI Mortgage Insurance Co.
Infrastructure and System Operations
916.851.7120
--------------------------------------------------------------------
Message: 1
Date: Sat, 5 Nov 2005 11:05:33 -0800
From: "Matthew Beck" <matthew.beck at pmigroup.com>
Subject: [unixODBC-support] DB2 connect issue
To: <unixodbc-support at easysoft.com>
Message-ID:
	
<857DE10121ACB24AB5957FA458207E8A0409E0FE at PMI-HOME01.us.corp.pmigroup.co
m>
	
Content-Type: text/plain; charset="us-ascii"

I continue receiving this message and am having difficulty locating a
solution:

bash-2.03$ isql -v PCLMUS1 xxxxxxxx xxxxxxxx
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on
SQL_HANDLE_DBC failed
[IM003][unixODBC][Driver Manager]Can't initiate unicode conversion
[ISQL]ERROR: Could not SQLConnect

Any help would be appreciated.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mail.easysoft.com/pipermail/unixodbc-support/attachments/20051105
/959f7e86/attachment-0001.html

------------------------------

Message: 2
Date: Sun, 06 Nov 2005 11:03:28 +0000
From: "Martin J. Evans" <martin.evans at easysoft.com>
Subject: Re: [unixODBC-support] DB2 connect issue
To: Support for the unixODBC project <unixodbc-support at easysoft.com>
Message-ID: <436DE300.6050103 at easysoft.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

See
http://www.easysoft.com/support/kb/kb00809.html

You need to set DB2INSTANCE.

Martin

Matthew Beck wrote:
> I continue receiving this message and am having difficulty locating a 
> solution:
> 
> bash-2.03$ isql -v PCLMUS1 xxxxxxxx xxxxxxxx
> 
> [IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on 
> SQL_HANDLE_DBC failed
> 
> [IM003][unixODBC][Driver Manager]Can't initiate unicode conversion
> 
> [ISQL]ERROR: Could not SQLConnect
> 
> Any help would be appreciated.
> 
> Thanks!
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support




More information about the unixODBC-support mailing list