My system admins have updated our production Linux environment to accommodate a number of system changes unrelated to my R stack which lives on the same machine. I wasn't expecting any impact on my tooling, but ever since the upgrade, I've been unable to get
odbc to connect to SQL Server using FreeTDS. What's so weird is that I can connect just fine. But any attempt to execute a query results in:
> dbGetQuery(con, "select 'hi';") Error in new_result(connection@ptr, statement, immediate) : nanodbc/nanodbc.cpp:1345: 00000: [FreeTDS][SQL Server]Unknown error In addition: Warning message: In new_result(connection@ptr, statement, immediate) : Cancelling previous query
shockingly my Google Fu is failing me in figuring out what's going on.
Here's my system info:
> Sys.info() sysname release "Linux" "3.10.0-957.12.1.el7.x86_64" version nodename "#1 SMP Wed Mar 20 11:34:37 UTC 2019" "e8063f1b7fb9" machine
My connection string looks like this (with
pwd passed in as strings:
con <- DBI::dbConnect( odbc::odbc(), Servername = server, Driver = "FreeTDS", Database = database, Port = 1433, UID = user, PWD = pwd )
what's puzzling me how do I even debug an issue where I can connect, but not execute. Any ideas of how I even approach debugging?