We have just installed SQL Server Enterprise 2016 CTP 3.3 on a server that already had SQL 2012 Standard installed. We installed SQL2016 as a Named Instance and have been trying to get the R integration working, but we are having problems running the external scripts from management studio.
We walked through the Install the R Packages described here: https://msdn.microsoft.com/en-us/library/mt590809.aspx, And we have manually run the Post-Installation R Configuration steps listed here: https://msdn.microsoft.com/en-us/library/mt590536.aspx
At this point, we are able to connect to SQL from RStudio and manipulate data locally or on the server. However, we are not able to specify R script in Management Studio. When we try to run an R script in TSQL, we get the error message:
Msg 39011, Level 16, State 1, Line 1 SQL Server was unable to communicate with the LaunchPad service. Please verify the configuration of the service.
We have tried several of the sample R scripts including the following:
execute sp_execute_external_script @language = N'R' , @script = N' mytextvariable <- c("hello", " ", "world"); OutputDataSet <- as.data.frame(mytextvariable);' , @input_data_1 = N' SELECT 1 as Temp1' WITH RESULT SETS (([col] char(20) NOT NULL));
execute sp_execute_external_script @language = N'R' , @script = N' OutputDataSet <- InputDataSet;' , @input_data_1 = N' SELECT * FROM MyData;' WITH RESULT SETS (([NewColName] int NOT NULL));
execute sp_execute_external_script @language = N'R' , @script = N' SQLOut <- SQLIn;' , @input_data_1 = N' SELECT 12 as Col;' , @input_data_1_name = N'SQLIn' , @output_data_1_name = N'SQLOut' WITH RESULT SETS (([NewColName] int NOT NULL));
All of them result in the same error messages about not being able to communicate with the LaunchPad service.
Here are the configuration options we have verified seem to be configured correctly:
- We can see that “external scripts enabled” has a value of 1 when running “exec sp_configure”
- We can see the Windows User Group “SQLRUserGroupSQL2016” has been created in “Local Users and Groups”
- We can see the 20 Windows Users created for R processing in “Local Users and Groups”
- We can see that the Database Role “db_rrerole“ was created correctly on master db.
- We can see the Extended Stored Procedures “xp_ScaleR_ …” have been correctly created on master db.
- We have verified that the SQL Server Service for our Instance is running along with the SQL Agent Service and SQL LaunchPad Service.
- They are all logged in as the same Windows Domain User Account, and that user has been added to the Administrators Group for the server.
- We have tried restarting the above services many times as well as rebooting the server.
- We have tried connecting to Management Studio both using Windows Auth with a Domain Account that is in the Database Role “sysadmins”, and as a local SQL User Account that is in the Database Role “sysadmins”
- We manually added those users to the “db_owner” and “db_rrerole” roles on the master db (just to be sure)
Don’t know what else to check…