Sunday, March 11, 2012

Connecting to IBM DB2

We need to connect to an DB2 server using ODBC provider, so we tried witht he folowing:

Driver={IBM DB2 ODBC DRIVER};database=FirstDB; hostname=IP address; port=50000;protocol=TCPIP;

But when we try to connect using the above connection string we get teh following error:

"Test Connection failed because of an error in initializing provider. ERROR [IM004][Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed"

we are not getting wat is the problem. we are able to connect to this DB2 database from the same DB2 server but we are not able to connect to the server from a remote machine.

Thanks in advance.

Make sure you have the same driver installed on your remote machine as you have installed on the server. It may be possible that you have an out of date DB2 driver on your remote machine if nothing else is different.

Hope that helps,

John

No comments:

Post a Comment