Where does BCP find the driver?
number-cruncher opened this issue · 3 comments
I installed mssql-tools (https://cloudblogs.microsoft.com/sqlserver/2017/05/16/sql-server-command-line-tools-for-macos-released/). sqlcmd works. however bcp throws the following error on mac. Unable to locate driver dynamic library. BCP cannot continue. Where does BCP look for the driver library?
Solved it by installing MSSQL 17 (13 didn't work) then updating the odbc.ini and odbcinst.ini files.
odbc.ini
[MSSQL]
Description = Warehouse
Driver = ODBC Driver 17 for SQL Server
Server = tcp:serverip,1433
odbcinst.ini
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.17.dylib
Setup=/usr/local/lib/libmsodbcsql.17.dylib
UsageCount=1
Thank you for posting how you solved the problem, this worked for me as well.