SQL Server was unable to communicate with the LaunchPad service

Posted on

Question :

I have run the below code:

execute sp_configure 'external scripts enabled';

and it is giving me the output as:

name                    minimum maximum config_value    run_value
external scripts enabled    0    1       1              1

I have also started the launchpad services, still when I am running the below code:

exec sp_execute_external_script @language =N'R',   
@input_data_1 =N'select 1+1 as SUMOutput'  
with result sets (([SUM Output] int not null));  

It is throwing the error:

Msg 39011, Level 16, State 1, Line 7 SQL Server was unable to
communicate with the LaunchPad service. Please verify the
configuration of the service. Msg 11536, Level 16, State 1, Line 7
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

I have SQL Server 2016 editon and the SQL Server Management Studio is 2017.
i have the following snippet of my services.
Services running

Answer :

I had the same issue and I solved it by installing the Service Pack on top of the media installed R.

I think it is a related to install an old version of LaunchPad on an already updated SQL Server.

As per this Q&A

SQL Server LaunchPad “The service did not respond in a timely fashion” + No Log in ExtensibilityLog

My timeline.

  • My sql install was a semi-updated SP1.
  • My media was a stock SP1.
  • I installed R, wouldn’t work (Restarted, same)
  • LaunchPad wouldn’t start (Restarted, same)
  • Made sure the SQL user account was part of the R group
  • LauchPad would start but R wouldn’t work. (Restarted, same)
  • Updated to SP2 (Restarted)
  • R worked.
  • Updated to SP2 CU4 (Restarted)
  • R worked.

My testing script

    EXEC sp_execute_external_script
                      @language =N'R',
                      @input_data_1 =N'SELECT 1 AS hello'
                      WITH RESULT SETS (([Hello World] INT));

Leave a Reply

Your email address will not be published. Required fields are marked *