title: [ISQL]ERROR: Could not SQLConnect: [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
body: <p>I have defined the connection steps below but I get an error. Tried most of the available drivers in /usr/lib64/ but still same error.</p>
  
  <blockquote>
    <p>/usr/local/etc/freetds.conf</p>
  </blockquote>
  
  <pre><code>#Server defined by Victor
  [THESERVER]
     host = 172.xx.xxx.xx
     port = 1433
     tds version = 7.2
  </code></pre>
  
  <blockquote>
    <p>/etc/odbc.ini</p>
  </blockquote>
  
  <pre><code># Defined by victor
  [CRMCONNECT]
  Description = "CRMConnect"
  Driver = msSQL
  Trace = Yes
  Servername = THESERVER
  hostname = 172.xx.xxx.xx
  Database = "THE_DB"
  UserName = "user"
  Password = "password"
  PROTOCOL = TCPIP
  </code></pre>
  
  <blockquote>
    <p>/etc/odbcinst.ini</p>
  </blockquote>
  
  <pre><code>[msSQL]
  Description = msSQL Driver
  Driver = /usr/lib64/libodbc.so.2.0.0
  fileusage=1
  dontdlclose=1
  
  
  command
  [root@darubini ~]# isql -v "CRMCONNECT" "user" "password"
  </code></pre>
  
  <blockquote>
  <pre><code>Error message
  [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
  [ISQL]ERROR: Could not SQLConnect
  </code></pre>
  </blockquote>
  
  <p>Below is a snapshot of the available libodbc and libtds drivers . Where would i be going wrong.
  <a href="https://i.stack.imgur.com/zOqZC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zOqZC.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/CuY1l.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CuY1l.jpg" alt="enter image description here"></a></p>