I am looking to connect to the SQL server using RStudio Server. Initially I used the library(RJDBC) to connect to SQL server by creating a new username and password and connect using the code below
drv <- JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver","/home/user/sqljdbc4-4.0.jar")
conn <- dbConnect(drv, "jdbc:sqlserver://servername;username=username;password=password")
However recently due to compliance I have to use my windows user id and password in order to connect. I tried using the RODBC with trusted connection but it still does not work. I am wondering if it is because I am using the R server as compared to R desktop and hence it cannot recognize my trusted connection. If that is the case then what is the workaround?
I have tried links below but nothing worked
Connect R to a SQL Server database engine
RODBC odbcDriverConnect() Connection Error
Following is the error that I am getting
[RODBC] ERROR: state 01000, code 0, message [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
What would this error mean?