未加星标

Setup R Services for SQL Server 2016

字体大小 | |
[数据库(mssql) 所属分类 数据库(mssql) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

By:Vitor Montalvao || Related Tips:More >SQL Server 2016

Problem

In the beginning of 2015 Microsoft purchased Revolution Analytics and with that they were able to incorporate R (the most popular open source programming language for advanced analytics) inside of SQL Server bringing R processing closer to the data and eliminating the need to export SQL Server data in order to perform R processing against it.

By incorporating R processing into SQL Server 2016, Microsoft is offering R Services as a new feature that supports enterprise-scale data science. Data scientists are now able to take their existing R code and run it right inside the SQL Server database engine to support advance analytics against big data.

This is the first version of SQL Server to have an integrated support for Revolution R for statistical analysis of data embracing the highly popular open source R language with the business to facilitate a deeper insight into the data.

Let see how to setup it.

Solution

R Services for SQL Server 2016 step by step setup (only showing the relevant steps for R Service).

Step 1

R Services (In-Database) feature can be installed by using the SQL Server setup wizard. Run SQL Server 2016 setup and on the Installation tab , click New SQL Server stand-alone installation or add features to an existing installation .

NOTE: R Services for SQL Server 2016 is not cluster aware, so it can't be installed in a failover cluster.


Setup R Services for SQL Server 2016
Step 2

On the Feature Selection page, select Database Engine Services and R Services (In-Database) options. This option configures the database services used by R jobs and installs the extensions that support external scripts and processes.

NOTE: R Server (Standalone) is an option that lets you use the Scale R libraries on a windows computer that isn't running SQL Server. Only use this option to install Microsoft R Server (Standalone) on a computer that is used for R development, to create R solutions that later can be deployed to an instance of SQL Server running R Services (In-Database).


Setup R Services for SQL Server 2016
Step 3

After all the configurations are set, on the page Consent to Install Microsoft R Open , click Accept .

This license agreement is required to download Microsoft R Open, which includes a distribution of the open source R base packages and tools, together with enhanced R packages and connectivity providers from Revolution Analytics and by clicking on Accept the Next > button will be enabled.

NOTE: Check the next step if the computer you are using does not have internet access.


Setup R Services for SQL Server 2016
Step 4

The following page ( Offline Installation of Microsoft R Open and Microsoft R Server ) will only appear if the computer you are using does not have internet access. It provides the links to download the necessary files, so this setup can be paused while you download separately the Microsoft R Open and Microsoft R Server.

After downloading the files, click Browse and provide the correct location to the previously downloaded files.

NOTE: Alternatively you can download the necessary files from this link (when performing a slipstream install provide the respective Microsoft R Open and Microsoft R Server files).


Setup R Services for SQL Server 2016
Step 5

On the Ready to Install page, verify what selections are included and confirm by clicking on Install and when installation is complete, restart the computer.

Step 6

After restarting the computer the R Services feature needs to be enabled otherwise it will not be possible to invoke R scripts even if the feature has been installed by setup.

For that, open SQL Server Management Studio and connect to the instance where you installed R Services (In-Database) and run the following command to explicitly enable the R Services feature:

EXEC sp_configure 'external scripts enabled', 1
GO
RECONFIGURE WITH OVERRIDE
GO Step 7

For the changes to take effect you will need to restart the SQL Server service for the SQL Server instance. If SQL Server Trusted Launchpad service is stopped then start it also. You can restart the services by using SQL Server Configuration Manager.


Setup R Services for SQL Server 2016

NOTE: At this point if you are facing errors because SQL Server Launchpad service cannot be started please read thisarticle that I wrote to solve the issue.

Step 8

After the SQL Server Launchpad starts you should be able to run simple R scripts like the following in SQL Server Management Studio.


Setup R Services for SQL Server 2016

NOTE: If the R script returns an "Unable to communicate with the runtime for 'R' script in SQL Server" error please read thisarticle that I wrote to solve this issue.

Next Steps References: Set up SQL Server R Services (In-Database)

Last Update: 2/2/2017


Setup R Services for SQL Server 2016
Setup R Services for SQL Server 2016
About the author
Setup R Services for SQL Server 2016
Vitor Montalvo is a SQL Server engineer with 20 years of experience in SQL Server, specializing in performance & tuning, data modelling, migration and security. View all my tips

Related Resources

More SQL Server DBA Tips...

本文数据库(mssql)相关术语:熊片数据库 mssql数据库 oracle数据库 pubmed数据库 access数据库 万方数据库

主题: SQLSQL ServerWindows
分页:12
转载请注明
本文标题:Setup R Services for SQL Server 2016
本站链接:http://www.codesec.net/view/530310.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mssql) | 评论(0) | 阅读(21)