Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error of SQL Server 2016 sp_execute_external_script with R integration

I am evaluating SQL Server 2016 in-database integration with R on Windows 10. I have followed the steps installed all components and scripts. Now I have following questions:

Where does sp_execute_external_script reside? I can’t find it. When I run script, for example:

execute sp_execute_external_script @language = N'R' , @script = N' OutputDataSet <- InputDataSet;' , @input_data_1 = N' SELECT TOP 100 [BusinessEntityID] FROM [AdventureWorks2014].[Person].[Person];';

I got error:

“Msg 39021, Level 16, State 1, Line 1 Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime. Msg 39019, Level 16, State 1, Line 1 An external script error occurred: Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).”

Based on the above suggestion, I rerun the script, but it does not solve the problem.

Any suggestions are greatly appreciated.

like image 403
Frank Avatar asked Nov 18 '15 15:11

Frank


1 Answers

RegisterRExt post installation configuration needs to specify the correct instance name as per this MSDN article .

You can run the following commands to fix your issue:

"%programfiles%\RRO\RRO-3.2.2-for-RRE-7.5.0\R-3.2.2\library\RevoScaleR\rxLibs\x64\RegisterRExt" /uninstall

"%programfiles%\RRO\RRO-3.2.2-for-RRE-7.5.0\R-3.2.2\library\RevoScaleR\rxLibs\x64\RegisterRExt" /install /instance:InstanceName

like image 67
Arun Gurunathan Avatar answered Oct 13 '22 01:10

Arun Gurunathan