Connecting to Partners Microsoft SQL server from Partners Rstudio (


  • Instructions to connect to Partners MS SQL servers from Partners Rstudio (



  • You have to have access ready for the SQL server that you want to connect to.
  • You need to know the database server name. You do not have to set the database name.




       In this example, we are trying to connect to as user hp911


  1. Open any text editor and paste the following


Driver = FreeTDS

Server =

Port = 1433

TDS_Version = 8.0


  1. Save as “.odbc.ini”. Do not forget the leading dot.


  1. Open Partners Rstudio and upload this file to your home directory.


  1. Quit the current session and start new session


  1. Let’s test in R console (


>odbc <- odbcConnect("phsedw", "Partners\\hp911", .rs.api.askForPassword("password"))

>dat <- sqlQuery(odbc, "## your query here ##")

Go to KB0034069 in the IS Service Desk

Related articles