ODBC driver and config on the Mac?
Hello, I’ve been trying to connect to MonetDB via ODBC on Mac OS X, without luck. I’m seeing the ODBC drivers in /usr/local/monetdb/lib/, but I’m confused that they are .so files and not .dylib. It looks like all the others are .dylib, and as far as I know that’s required so they can be loaded dynamically. I’ve tried using the .so files in the ODBC manager, but that has only made it crash. Has anybody used MonetDB with ODBC on the Mac? Can you perhaps show me your configuration? Thanks, Robert
Hi Robert,
I’ve been trying to connect to MonetDB via ODBC on Mac OS X, without luck. I’m seeing the ODBC drivers in /usr/local/monetdb/lib/, but I’m confused that they are .so files and not .dylib. It looks like all the others are .dylib, and as far as I know that’s required so they can be loaded dynamically. I’ve tried using the .so files in the ODBC manager, but that has only made it crash.
Has anybody used MonetDB with ODBC on the Mac? Can you perhaps show me your configuration? Yes, although I used unixodbc (installed from Homebrew). I installed MonetDB from source with the --enable-odbc=yes parameter to ./configure.
Then I created two files, odbcinst.ini and odbc.ini. Contents of odbcinst.ini: [MonetDB] Description = MonetDB Driver Driver = /path/to/libMonetODBC.so Setup = /path/to/libMonetODBCs.so Then I used odbcinst -i -d -f odbcinst.ini Output: odbcinst: Driver installed. Usage count increased to 1. Target directory is /usr/local/Cellar/unixodbc/2.3.2/etc to load the file Contents of odbc.ini: [MonetDB] Description = Connection for MonetDB Driver = MonetDB Database = whatever Servername = localhost User = monetdb Password = monetdb Port = 50000 Then: odbcinst -i -s -f odbc.ini This seemed to work: echo "SELECT 1" | isql MonetDB +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ +-----+ | | +-----+ | 1 | +-----+ SQLRowCount returns 1 1 rows fetched I also found, that you may need to set DYLD_LIBRARY_PATH=/usr/local/lib (the location of libodbc.dylib) in order for ODBC applications to find the correct driver. Hope this helps, Best, Hannes
participants (2)
-
Hannes Mühleisen
-
Robert Kosara