Wednesday, May 3, 2017

Starting with Microsoft SQL Server R Services in SQL Server 2016

R is a statistical programming language, It has been getting a lot of attention since data mining and machine learning is getting popular every day. You can use R language to analyze the larger datasets, OLTP tables in real time or any kind of big data analysis in SQL Server 2016. Microsoft is planning to support the Python language in SQL Server 2017. SQL Server R Services renamed as Machine Learning Services in SQL Server 2017.  Combining R and Python with SQL Server will give us a powerful platform to develop machine learning services. I am going to show you how to install R Services to your SQL Server 2016 in this article.


To Install R Services, start SQL Server setup and click on the New R Server option.

Select R Services (In Database) from Instance Features.
After the installation, you need to restart your SQL Server. You should be able to see SQL Server Launchpad is running under the services.


   This was the half of the work to start developing in R in SQL Server. We are not done yet. After the installation you are going to need some kind of IDE environment to connect to your SQL Server R-Services. Microsoft has two options for you.

    Formerly knows as Revolution R Open(RRO), is the enhanced distribution of R. It is 100% free and open source. It is compatible with any R engine and compatible with all packages, scripts and applications that work with R-3.3.3

Microsoft R Client (Windows / Linux)
    R Client is free just like Microsoft R Open, It built on top of Microsoft R Open. Biggest limitation for R Client is all computation and memory is limited to client machine but you can push the computational operations to Microsoft R Server / SQL Server R Services to get a better performance. You need to download IDE environment and the R Libraries separately. R Tools for Visual Studio is the best option for IDE.
Here is a screenshot of R Tools for Visual Studio.

   SQL Server is more powerful with this addition for sure. It sounds like Microsoft has great additions coming up in the newer versions of SQL Server for data scientists. I am going to write another article about how to connect and run a simple R script on SQL R-Services later.

No comments:

Post a Comment