Error: nanodbc/nanodbc.cpp:950: HY000: [unixODBC][RStudio][SqlServerODBC] (0) Failed to connect to the SQL Server instance: Server not found.
I am new to using RStudio for connection to SQL Server. We have Windows Authentication and I tried the code below and the error posted in the topic is what I am getting. I am completely lost. Please help.
con <- dbConnect(odbc(),
Driver = "sqlserver",
Server = "prodedw2",
Database = "DataWarehouse",
Trusted_Connection = "True")
I also tried using a User DSN and get a similar error.
con <- dbConnect(odbc(), "EDWProd")
Error: nanodbc/nanodbc.cpp:950: IM002: [unixODBC][Driver Manager]Data source name not found, and no default driver specified