Support

NTLM Support for SQL Server professional driver

Follow

If you are using RStudio professional products, you can use the RStudio Professional Drivers at no additional cost. See here for more information.

As of version 1.4.13, you can now configure the SQL Server Linux driver to authenticate connections using the NTLM protocol. For more information, see the latest Installation and Configuration Guide at docs.rstudio.com. These instructions give a step-by-step for getting started.

Getting Started

1. Update the SQL Server driver

The recommended installation path for RStudio Professional Drivers is /opt/rstudio-drivers/. Remember to remove previous driver versions before installing newer versions.

sudo wget https://drivers.rstudio.org/7C152C12/1.6/odbc-install.sh
sudo chmod +x odbc-install.sh
sudo ./odbc-install.sh --sqlserver

2. Configure authentication using NTLM

  1. Set the Trusted_Connection property to NTLM.
  2. Set the Integrated Security property to true.
  3. Set the UID property to an appropriate user name for accessing the server.
  4. Set the PWD property to the password corresponding to the user name that you provided above.

An example DSN:

[SQL Server]
Driver=sqlserver
Server=192.168.222.160
Port=1500
Database=TestDB
Integrated Security=true
Trusted_Connection=NTLM
UID=domain\simba
PWD=simba

3. Validate with isql

> isql "SQL Server" -v

4. Connect in R

library(DBI)
con <- dbConnect(odbc::odbc(), "SQL Server")

References

If you have issues with database connections, open a ticket at support@rstudio.com or see the other useful guides:

Comments