Working Oracle, unixODBC and Erlang

  • fake odbcinst.ini location into SOMETHING/etc $ mkdir $HOME/etc $ cp $ORIDIR/odbcinst.ini $HOME/etc
  • run $ORACLE_HOME/odbc/utl/odbc_update_ini.sh it will update fake odbcinst.ini and produce ~/.odbc.ini , copy both file to desire location $ $ORACLE_HOME/odbc/utl/odbc_update_ini.sh $HOME $ORACLE_HOME/lib $ sudo cp $HOME/etc/odbcinst.ini $ORIDIR $ sudo cp ~/.odbc.ini $ORIDIR/odbc.ini
  • make /tmp/.oracle read-write for user oracle and group dba $ sudo chown oracle.dba /tmp/.oracle $ sudo chmod ug+rw /tmp/.oracle
  • export LD_LIBRARY_PATH=$ORACLE_HOME/lib $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
  • export ORACLE_SID , this is case sensitive $ export ORACLE_SID=XE
  • run ldd $ORACLE_HOME/lib/libsqora.so.* to find library dependency for my system I have to soft link libodbcinst.so $ ldd $ORACLE_HOME/lib/libsqora.so.11.1 $ sudo ln -s /usr/lib64/libodbcinst.so.2 /usr/lib64/libodbcinst.so.1
  • in erlang must use connection option [{scrollable_cursors,off}]
  • there is no way to use userid and password in odbc.ini it's must be declare explicitly in connection string