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 server, database, user, and pwd passed in as strings:
so the ODBC test is to use isql command line tool to issue queries. I had to set up a DNS entry in order to do that because sql requites a DNS. When I did that I could then look at my DNS entry:
$ cat ~/.odbc.ini
[MYSERVER]
Description = Test to SQLServer
Driver = FreeTDS
Trace = Yes
TraceFile = /tmp/sql.log
Database = analysts
Servername = myserver
Port = 1433
Protocol = 7.2
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No