How do I connect Haskell HDBC to an oracle db on osx

不问归期 提交于 2020-01-14 06:01:48

问题


I was wondering how you are supposed to connect to an oracle db on mac with Haskell HDBC.

I tried doing it through ODBC, by running brew install unixobcd and then installing oracle instant client basic and obdc into a directory. Then in Haskell, with HDBC and HDBC-odbc both installed, calling connectODBC with Driver set to the location of libsqora.dylib.12.1 in said directory.

It is giving me sot-dba: SqlError {seState = "[\"01000\"]", seNativeError = -1, seErrorMsg = "connectODBC/sqlDriverConnect: [\"0: [unixODBC][Driver Manager]Can't open lib '<valid absolute path to libsqora.dylib.12.1>' : file not found\"]"}, but when I cat that location it spills out the appropriate unreadably binary, so its definitely a valid file location.

I was wondering if anyone could either help debug my issue, or just give me instructions on how to set it up from scratch and I will happily do it over properly. I just have no idea where to go from here since it is claiming a file doesn't exist that does, and I am having trouble finding many results on google on how to debug that.

One thing perhaps worth noting is that I ran ./odbc_update_ini.sh /usr/local/Cellar/unixodbc/2.3.4 to set up the oracle odbc driver, because that is the location that brew put unixodbc, was that perhaps incorrect?

If necessary I could consider a different library than HDBC, but I would strongly prefer not having to, it seems like some other libraries such as persistent actually use hdbc/hdbc-odbc under the covers anyway, so surely this shouldn't be hard.

来源:https://stackoverflow.com/questions/44932715/how-do-i-connect-haskell-hdbc-to-an-oracle-db-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!