Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Toronto, Canada

    Unanswered: ODBC - SQLConnect: rc=-1, SQLSTATE: IM004

    A user is trying to connect to db on Linux. JDBC connection is successful but can't connect using ODBC.

    The error message says:

    Hyperion - Explorer
    SQLConnect: rc=-1, SQLSTATE: IM004, Error Msg: [Microsoft][ODBC Driver Manager] Driver's
    SQLAllocHandle on SQL_HANDLE_ENV failed

    I found the following technote, but I think this is for DB2 server on Win:
    IBM SQLSTATE IM004 when connecting via an ODBC application - United States

    I don't see any errors in the db2diag.log (diaglevel 3). The user id is part of the group that has connect to db and select on user tables.

    Can you please suggest what to look for, where the problem might be, how to debug it, etc...? Do they need to install DB2 client on their Windows machine for this ODBC connection?

  2. #2
    Join Date
    Apr 2012
    Provided Answers: 27
    Yes, you need a DB2 driver on the client if you want an ODBC connection .
    Java-applications that can use a type-4 jdbc driver don't need a db2 client (they can ship the jdbc driver for db2 embedded in their installation image).
    But non-java applications that use ODBC only , they need a db2 driver (the basic run time client should do, but you will need to catalog node, db, and odbc data source in the normal way).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts