- In RStudio, open a new script file (File | New File | R Script). Save the file in the Chapter08.R file.
- Install the RODBC package and load the library to memory. You can use the following code for this task. Highlight the code in RStudio and press Ctrl + Enter to execute the code. Note that you need to have a web connection in order to install a package:
# Install RODBC library install.packages("RODBC"); # Load RODBC library library(RODBC);
- In SQL Server, create a SQL Server login named RUser, with the password Pa$$w0rd. Create a database user in the AdventureWorksDW2014 database for this user and add it to the db_datareader role. You can execute the following code in SSMS to create this login and user:
-- Add Ruser ...