I'm trying to execute a new stored proc in 2016 named sp_execute_external_script. I first need to enable external scripts as follows:

sp_configure 'external scripts enabled', 1;

After doing this, I see this message:

Configuration option 'external scripts enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.

I then execute RECONFIGURE and see a message saying, "Command(s) completed successfully".

I then attempt to execute the following, to see if R is working correctly:

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

When I do so, I see the following error:

Msg 39023, Level 16, State 1, Procedure sp_execute_external_script, Line 1 [Batch Start Line 3]
'sp_execute_external_script' is disabled on this instance of SQL Server. Use sp_configure 'external scripts enabled' to enable it.

Any ideas why?

  • 2
    If you run sp_configure 'external scripts enabled'; what is the run_value returned? You may need to restart SQL Server first. Aug 3, 2016 at 15:52
  • 2
    The need to restart SQL Server after changing this parameter is documented behavior: msdn.microsoft.com/en-us/library/mt590884.aspx
    – dpw
    Aug 3, 2016 at 19:21

2 Answers 2


After turning on external scripts, you'll need to restart SQL Server so that when you run

sp_configure 'external scripts enabled';

it returns a run_value of 1:

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

Documentation: External Scripts Enabled server configuration option


Just ensure your SQL Server Launchpad Service is started. If the service is stopped, sp_configure 'external scripts enabled' will not have any effect running external scripts.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.