--- title: Prerequisites for the data science walkthrough for SQL Server and R | Microsoft Docs ms.prod: sql ms.technology: machine-learning ms.date: 04/15/2018 ms.topic: tutorial author: HeidiSteen ms.author: heidist manager: cgronlun --- # Prerequisites for the data science walkthrough for SQL Server and R [!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md-winonly](../../includes/appliesto-ss-xxxx-xxxx-xxx-md-winonly.md)] We recommend that you do this walkthrough on a laptop or other computer that has the Microsoft R libraries installed. You must be able to connect, on the same network, to a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] computer with machine learning services and the R language enabled. You can run the walkthrough on a computer that has both [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and an R development environment but we don't recommend this configuration for a production environment. ## Install machine learning for SQL Server You must have access to an instance of SQL Server with support for R installed. This walkthrough was originally developed for SQL erver 2016 and tested on 2017, so you should be able to use either of the following SQL Server versions. (There are some small differences in the RevoScaleR functions between the releases.) + Machine Learning Services (In-Database) for SQL Server 2017 + SQL Server 2016 R Services For more information, see [Install SQL Server 2017 Machine Learning Services](../install/sql-machine-learning-services-windows-install.md) or [Install SQL Server 2016 R Services](../install/sql-r-services-windows-install.md). > [!IMPORTANT] > SQL Server versions earlier than 2016 do not support integration with R. However, you can use older SQL databases as an ODBC data source. ## Install an R development environment For this walkthrough, we recommend that you use an R development environment. Here are some suggestions: - **R Tools for Visual Studio** (RTVS) is a free plug-in that provides Intellisense, debugging, and support for Microsoft R. YOu can use it with both R Server and SQL Server Machine Learning Services. To download, see [R Tools for Visual Studio](https://www.visualstudio.com/vs/rtvs/). - **Microsoft R Client** is a lightweight development tool that supports development in R using the RevoScaleR package. To get it, see [Get Started with Microsoft R Client](https://docs.microsoft.com/machine-learning-server/r-client/what-is-microsoft-r-client). - **RStudio** is one of the more popular environments for R development. For more information, see [https://www.rstudio.com/products/RStudio/](https://www.rstudio.com/products/RStudio/). You cannot complete this tutorial using a generic installation of RStudio or other environment; you must also install the R packages and connectivity libraries for Microsoft R Open. For more information, see [Set Up a Data Science Client](../r/set-up-a-data-science-client.md). - Basic R tools (R.exe, RTerm.exe, RScripts.exe) are also installed by default when you install R in SQL Server or R Client. If you do not wish to install an IDE, you can use these tools. ## Get permissions on the SQL Server instance and database To connect to an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to run scripts and upload data, you must have a valid login on the database server. You can use either a SQL login or integrated Windows authentication. Ask the database administrator to configure the following permissions for the account, in the database where you use R: - Create database, tables, functions, and stored procedures - Write data into tables - Ability to run R script (`GRANT EXECUTE ANY EXTERNAL SCRIPT to `) For this walkthrough, we have used the SQL login **RTestUser**. We generally recommend that you use Windows integrated authentication, but using the SQL login is simpler for some demo purposes. ## Change list + This sample was originally developed using SQL Server 2016 R Services. However, breaking changes were introduced in the Microsoft R components for 2016 SP1. Specifically, the _varsToDrop_ and _varsToKeep_ parameters were no longer supported for SQL Server data sources. Therefre, if you downloaded a version of the tutorial prior to SP1, it will no longer work with post-SP1 builds. + The current version of the sample has been tested using a pre-release build of SQL Server 2017 Machine Learning Services (RC1 and RC2). In general, almost all steps should run without modification between 2016 SP1 and 2017. ## Next lesson [Prepare the data using PowerShell](/walkthrough-prepare-the-data.md)