title: EXECUTE statement failed because its WITH RESULT SETS clause specified 1 result set
body: <p>I'm trying to run a simple R code in SQL  Server 2016:</p>
  
  <pre><code>    EXEC sp_execute_external_script
     @language =N'R',
      @script=N'OutputDataSet&lt;-InputDataSet',
      @input_data_1 =N'SELECT 1 AS hello'
      WITH RESULT SETS (([hello] int not null));
     GO
  </code></pre>
  
  <p>I have followed this link to configure: <a href="https://tomaztsql.wordpress.com/2016/07/26/enabling-sp_execute_external_script-to-run-r-scripts-in-sql-server-2016/" rel="nofollow noreferrer">https://tomaztsql.wordpress.com/2016/07/26/enabling-sp_execute_external_script-to-run-r-scripts-in-sql-server-2016/</a></p>
  
  <p>I'm getting error:</p>
  
  <pre><code>    Msg 39023, Level 16, State 1, Procedure sp_execute_external_script, 
       Line 1 [Batch Start Line 0]
       'sp_execute_external_script' is disabled on this instance of SQL 
    Server. Use sp_configure 'external scripts enabled' to enable it.
    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.
  
       when I checked with :
  
    EXECUTE sp_configure;
    GO
    The result shows like this:
    name                    minimum         maximum        config_value      run_value
    external scripts enabled  0          1                1                0
  </code></pre>
  
  <p>Why the run value is still 0 (note-I have SQL Server Launchpad restarted)? What is the resolution for this?</p>