title: connecting to DB2 database:[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
body: <p>odbc.ini:</p>
  
  <pre><code>[DEFAULT]
  Driver          = DB2
  [abc]
  Driver          = DB2
  [dsn_test1]
  DESCRIPTION = Connection to DB2
  Driver          = db2
  </code></pre>
  
  <p>odbcinst.ini:</p>
  
  <pre><code>[DB2]
  Description = DB2 Driver
  Driver = /home/user/sqllib/lib/libdb2.so
  fileusage=1
  dontdlclose=1
  
  [ODBC]
  Trace=1
  TraceFile=/home/user/sqllib/trace.out
  </code></pre>
  
  <p>db2cli.ini</p>
  
  <pre><code>[abc]
  hostname="hostname"
  pwd="passwd"
  port="port"
  PROTOCOL=TCPIP
  database="dbname"
  uid="uid"
  </code></pre>
  
  <p>$ ./isql abc</p>
  
  <pre><code>+---------------------------------------+
  | Connected!                            |
  |                                       |
  | sql-statement                         |
  | help [tablename]                      |
  | quit                                  |
  |                                       |
  +---------------------------------------+
  </code></pre>
  
  <p>while connecting from db2 driver,below error is coming:</p>
  
  <pre><code>Connection attempt for data source name "abc":
  ===============================================================================
  ODBC Driver Manager Path: /home/user/sqllib/odbclib/lib/libodbc.so
  
  [FAILED]: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV 
  failed
  </code></pre>
  
  <p>Below is the snippet of odbc trace:</p>
  
  <pre><code>[ODBC][23419][1403783774.660159][SQLConnect.c][1380]Error: IM004
  [ODBC][23419][1403783774.660223][SQLError.c][434]
      Entry:
          Connection = 0x81aaac8
          SQLState = 0xffff9593
          Native = 0xffff9684
          Message Text = 0xffff8d93
          Buffer Length = 1024
          Text Len Ptr = 0xffff95bc
  [ODBC][23419][1403783774.660260][SQLError.c][471]
      Exit:[SQL_SUCCESS]
          SQLState = IM004
          Native = 0xffff9684 -&gt; 0
          Message Text = [[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed]
  </code></pre>
  
  <p>Googled a lot for root-cause,dint helped much,please provide some pointer to solve this.
  its a 32 bit linux machine having 32 bit db driver as well.</p>