title: Having trouble connecting R to SQL Server after sql server upgrade to TLS 1.2
body: <p>I have always used the following code to successfully connect to sql server in R</p>
  
  <pre><code>dbhandle=odbcDriverConnect("Driver={SQL Server};Server=servername;Database=databasename;Trusted_Connection=Yes")
  </code></pre>
  
  <p>However, after sql server was upgraded to be compatible with TLS 1.2 it has the following error</p>
  
  <pre><code>Warning messages:
  1: In odbcDriverConnect("Driver={SQL Server};Server=MHPOPMMSS100;Database=REZNKWB01;Trusted_Connection=Yes") :
    [RODBC] ERROR: state 08001, code 18, message [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error
  2: In odbcDriverConnect("Driver={SQL Server};Server=MHPOPMMSS100;Database=REZNKWB01;Trusted_Connection=Yes") :
    [RODBC] ERROR: state 01000, code 1, message [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()).
  3: In odbcDriverConnect("Driver={SQL Server};Server=MHPOPMMSS100;Database=REZNKWB01;Trusted_Connection=Yes") :
    ODBC connection failed
  </code></pre>
  
  <p>I have never needed a uid, but I have tried putting in the same userid I use to connect to sql server directly, I have tried trustedconnection=yes and no, I have tried adding the port after the server, basically anything I have read online I have tried. </p>
  
  <p>I am wondering if there is something I am missing or if anyone has input. Thanks!</p>