Error: "External script execution failed as extensibility environment is not ready yet....." in Sql 2016 with R service installed
<p>I install R-service in SQL 2016 Developer Edition, checked the installation and get the following report from the setup tool:</p>

<p><a href="https://i.stack.imgur.com/UBMs9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UBMs9.png" alt="Installed Components of SQL 2016 including R Service"></a></p>

<p>To test R Service, I run the following script:</p>

<pre><code>    sp_configure 'external scripts enabled', 1;  
    RECONFIGURE; 
    go

    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>And get the following error:</p>

<pre><code> Msg 39025, Level 16, State 1, Server WIN10, Line 1
 External script execution failed as extensibility environment is not ready yet. Retry the operation when the server is fully started.

 Msg 11536, Level 16, State 1, Server WIN10, Line 14
 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.
</code></pre>

<p>I installed the update of sql server 2016<br>
<a href="https://download.microsoft.com/download/1/E/F/1EF6D06B-D1D3-4E98-A727-00D9787AE572/SQL16RTMCU1/x64/SQLServer2016-KB3164674-x64.exe" rel="nofollow noreferrer">SQLServer2016-KB3164674-x64 update</a></p>

<p>I followed the steps in the post:
  <a href="https://stackoverflow.com/questions/36770607/sql-2016-rc3-r-services-error">SQL 2016 RC3 R Services Error</a>,
and <a href="https://stackoverflow.com/questions/38148268/r-in-sql-server-2016">r-in-sql-server-2016</a>
but still the error exist</p>

<p>As, you see in the figure, R service is reported as No configured
In spite of I executed the script:</p>

<pre><code>  sp_configure 'external scripts enabled', 1;  
</code></pre>

<ul>
<li>How To Configure R-Service  to be reported correctly.</li>
<li>How to resolve the above error. </li>
</ul>

<p><strong>Update:</strong></p>

<p>Based on the response  of "Umachandar - Microsoft":</p>

<p>SQL Server 2016 is running on Windows 10.</p>

<p>I checked  SQL errorlog and find the following errors:</p>

<pre><code> Unknown,SQL failed to boot extensibility for error code 0xa.
 Unknown,Error: 39002&lt;c/&gt; Severity: 16&lt;c/&gt; State: 1.
</code></pre>

<p>Also, I found the same extensibility error in Windows 10 Application Event:</p>

<pre><code> Log        Windows NT (Application)
 Source     MSSQLSERVER
 Category       (2)
 Event      39002
 Computer       xxxx
 Message
 SQL failed to boot extensibility for error code 0xa.
</code></pre>

<p><strong>Update 2:</strong></p>

<p><strong>Now it's working</strong> after applying the procedures in the answer and comments of Umachandar - Microsoft. </p>

<ul>
<li><p>Modified rlauncher.config in the folder E:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn</p>

<pre><code>WORKING_DIRECTORY=c:\ExtensibilityData
</code></pre></li>
<li><p>Using the Junction tool and  run the script:</p>

<pre><code>junction64.exe c:\ExtensibilityData "E:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData"
</code></pre></li>
<li><p>Restart the service: MSSQLLaunchpad</p></li>
<li><p>Executing the sql script in my post , return 1</p></li>
</ul>

<p>Many thank to Umachandar - Microsoft for advice and support.</p>