Problem enabling R Service in SQL Server 2016 RRS feed

  • Question

  • In order to run R in SQL Server 2016 you need to use the sp_execute_external_scripts stored procedure. In order to do use this, you need first set the external scripts enabled option, which by default is OFF.

    This does not seem to work.

    Details here:

    Although the external scripts enabled is checked I get the following error:

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


    Sunday, July 24, 2016 8:13 PM

All replies


    Please click Mark As Answer if my post helped.

    Monday, July 25, 2016 2:00 AM
  • SQL Server needs to be restarted after running sp_configure to make the change effective.

    Can you confirm you are seeing the issue even after restarting SQL Server?

    Monday, July 25, 2016 7:22 PM
  • Looking at the blog post I noticed the screenshot you have there says R Server (standalone) was installed, but in order to get in-database analytics with SQL Server you actually need to check the R Services (in-database) in SQL Server setup and not R Server standalone. If you haven't, please follow the install steps here: to make sure you are all set-up.



    Monday, July 25, 2016 10:55 PM
  • Microsoft R Open is installed when you install SQL Server 2016.

    Jayaram Krishnaswamy

    Tuesday, July 26, 2016 4:35 AM
  • Review this link:

    Jayaram Krishnaswamy

    Tuesday, July 26, 2016 4:37 AM
  • I struggled with this too - I found that I missed an important "next" step that the error doesn't tell you:

    EXEC sp_configure  'external scripts enabled', 1


    adding the extra parameter and the reconfigure line and then restarting SQL server got me going.

    Friday, January 12, 2018 4:46 AM
  • Have install  Advanced Analytics Extensions ?

    Install the Advanced Analytics Extensions feature during SQL Server setup to enable the execution of external scripts.

    After setup, to enable external scripts, execute the following script:

    sp_configure 'external scripts enabled', 1;
    You must restart SQL Server to make this change effective.

    Sunday, January 14, 2018 7:20 PM
  • You have to restart the database engine after enabling external scripts.

    Saturday, August 31, 2019 2:54 PM