Friday, July 29, 2016

This is what you need connecting to SQL Server 2016 from R

Once you have this you can connect to SQL Server 2016 and do statistics on the stored data.

Connection String is perhaps the most important parameter while connecting to SQL Server or for that matter any other source of data.

You should preferably launch the Microsoft's R Gui and specify a string variable to connect to SQL Server 2016 from within R Gui.

You need to create a string variable such as this for a trusted connection:
constrg <- database="AdventureWorks2014;" font="" river="SQL" server="Hodentek8\\OHANA;" trusted_connection="true">

If you have UserId (Uid) and Password (Pwd) with appropriate permissions you may use the following:
constrg2 <- color="#ff0000" river="SQL" server="<<font">your server&gt;; Database=AdventureWorks2014; Uid=; Pwd=";

Note 1: Your Server may be different and your database may be different
Note 2: For Server you may also use just a period as in:
Note 3: Keyword are case sensitive