Sunday, July 24, 2016

What is the connection string to use while connecting to SQL Server 2016 from R?

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:

If you have UserId (Uid) and Password (Pwd) with appropriate permissions you may use the following:

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

My apologies for an ill formatted post which I have now corrected by using images instead of formatted text.

No comments: