On an ubuntu based pc, I'm trying to use dplyr to explore datasets at my workplaces MS databases. So installed odbc and the drivers necessary and ran the following script:
library("odbc")
library("tidyverse")
con <- dbConnect(odbc(),
Driver="ODBC Driver 17 for SQL Server",
Server ="123.123.123.123",
Database = "database_name",
UID = "user_id",
PWD = rstudioapi::askForPassword("Database password"),
Port = 1433)
However, I get the following error:
Error: nanodbc/nanodbc.cpp:1021: 00000: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746 [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute
Thing is, I have been able to access another restricted database at my workplace no problem and I have also been able to access this one no problem on different sql clients on the same machine no problem. I'd appreciate any sort of input on the same. Thanks in advance.