SQL 2016 error : Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime

2

I started to explore R on SQL 2016 but running into errors. I resolved a few starting errors but can't get through with this one:

exec sp_execute_external_script  
  @language =N'R',    
  @script=N'OutputDataSet<-InputDataSet',      
  @input_data_1 =N'select 1 as hello'    
 with result sets (([hello] int not null));    
go   

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.).

Msg 11536, Level 16, State 1, Line 1 EXECUTE statement failed because its WITH RESULT SETS clause specified 1 result set(s), but the statement only sent 0 result set(s) at run time.

I found answers to set the Working Directory for R in Rlauncher.config.

But there is no Rlauncher.config on below path on my machine. Not Sure why?

C:\Program Files\Microsoft SQL Server 2016\MSSQL13.SQL2016\MSSQL\Binn

When I check the error log I see the following errors:

2016-11-13 19:41:14.131 Security Context Manager is initialized successfully.

2016-11-13 19:41:14.132 Satellite Session Manager is initialized successfully.

2016-11-13 19:41:14.133 Launcher DLL RLauncher.dll not loaded! Error: 126

2016-11-13 19:41:14.133 Failed to load the launcher RLauncher.dll and check satellite version

2016-11-13 19:41:14.133 No Launcher dlls were registered!

Please help.

sql-server
r
asked on Stack Overflow Nov 13, 2016 by Hemant Srivastava • edited Nov 16, 2016 by Hemant Srivastava

1 Answer

1

Please make sure you have installed the R Services (In-Database) in the SQL Setup Feature selection page. Please note this is different from the R Server option. See here for details.

answered on Stack Overflow Nov 23, 2016 by Arun Gurunathan

User contributions licensed under CC BY-SA 3.0