Problem getting SQL Server 2016 R Services (In-Database) workingSQL Server 2016 SP1 - Unable to execute R...

Book about a time-travel war fought by computers

When to use mean vs median

Relationship between the symmetry number of a molecule as used in rotational spectroscopy and point group

Has Wakanda ever accepted refugees?

Reason why dimensional travelling would be restricted

How can I handle a player who pre-plans arguments about my rulings on RAW?

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

How can I highlight parts in a screenshot

How does signal strength relate to bandwidth?

1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him

Wardrobe above a wall with fuse boxes

I can't die. Who am I?

When do _WA_Sys_ statistics Get Updated?

Formatting a table to look nice

Was it really inappropriate to write a pull request for the company I interviewed with?

Should I use HTTPS on a domain that will only be used for redirection?

GDAL GetGeoTransform Documentation -- Is there an oversight, or what am I misunderstanding?

If nine coins are tossed, what is the probability that the number of heads is even?

How do we objectively assess if a dialogue sounds unnatural or cringy?

Specific Chinese carabiner QA?

It doesn't matter the side you see it

Rationale to prefer local variables over instance variables?

Is there a frame of reference in which I was born before I was conceived?

Caulking a corner instead of taping with joint compound?



Problem getting SQL Server 2016 R Services (In-Database) working


SQL Server 2016 SP1 - Unable to execute R codeSQL Server was unable to communicate with the LaunchPad serviceAdded R Services to SQL Server 2016 Enterprise - Cannot get past Msg 39021Msg 39011 SQL Server was unable to communicate with the LaunchPad serviceDatabase existence not happened correctlyLoop a script for all DBs in SQL ServerBug with sp_execute_external_scriptThe R-code in SQL Server won't find package psychIn Memory Database Remove File and FileGroupAdded R Services to SQL Server 2016 Enterprise - Cannot get past Msg 39021How to grant more memory to run R processes in SQL Server 2016 R ServicesSQL Server was unable to communicate with the LaunchPad serviceSQL Server 2016 R Statistics: can't find function













2















SQL Server 2016 CU2 (Enterprise) here and one of my users has requested that we get R-Services installed.



I followed what appeared to be very simple instructions from this page



Set up SQL Server R Services (In-Database)



When I got to the part about using the simple test



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


it failed with




Msg 39021, Level 16, State 1, Line 6 Unable to launch runtime for 'R'
script. Please check the configuration of the 'R' runtime. Msg 39019,
Level 16, State 1, Line 6 An external script error occurred: Unable
to launch the runtime. ErrorCode 0x80070057: 87(The parameter is
incorrect.). Msg 11536, Level 16, State 1, Line 6 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.




So, I started my internet searching for known problems regarding R-Services and found this article - Known Issues for SQL Server R Services




  • I made sure that R-Services had been brought up to date with the Sql Server version (2016, CU2).

  • I read where long file names in the rlauncher.config file might cause problems, so I redirected my WORKING_DIRECTORY to C:TEMPR_SERVICES. However, I left the RHOME and MPI_HOME configuration entries untouched and still using long file names.

  • I made sure the Windows group SQLRUserGroup had full authority to that working directory folder.


After every configuration change, I restarted both SQL Server and SQL Server Launchpad.



However, every time I try to run the sample T-SQL test for R-Services, it fails and I see this entry in the rlauncher.log file




[Error] Session creation failed with: Failed with 2 to get security
for C:TEMPR_SERV~1MSSQLSERVER01




I'm reaching out for help from others that might know what the problem is or any additional troubleshooting links.










share|improve this question





























    2















    SQL Server 2016 CU2 (Enterprise) here and one of my users has requested that we get R-Services installed.



    I followed what appeared to be very simple instructions from this page



    Set up SQL Server R Services (In-Database)



    When I got to the part about using the simple test



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


    it failed with




    Msg 39021, Level 16, State 1, Line 6 Unable to launch runtime for 'R'
    script. Please check the configuration of the 'R' runtime. Msg 39019,
    Level 16, State 1, Line 6 An external script error occurred: Unable
    to launch the runtime. ErrorCode 0x80070057: 87(The parameter is
    incorrect.). Msg 11536, Level 16, State 1, Line 6 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.




    So, I started my internet searching for known problems regarding R-Services and found this article - Known Issues for SQL Server R Services




    • I made sure that R-Services had been brought up to date with the Sql Server version (2016, CU2).

    • I read where long file names in the rlauncher.config file might cause problems, so I redirected my WORKING_DIRECTORY to C:TEMPR_SERVICES. However, I left the RHOME and MPI_HOME configuration entries untouched and still using long file names.

    • I made sure the Windows group SQLRUserGroup had full authority to that working directory folder.


    After every configuration change, I restarted both SQL Server and SQL Server Launchpad.



    However, every time I try to run the sample T-SQL test for R-Services, it fails and I see this entry in the rlauncher.log file




    [Error] Session creation failed with: Failed with 2 to get security
    for C:TEMPR_SERV~1MSSQLSERVER01




    I'm reaching out for help from others that might know what the problem is or any additional troubleshooting links.










    share|improve this question



























      2












      2








      2








      SQL Server 2016 CU2 (Enterprise) here and one of my users has requested that we get R-Services installed.



      I followed what appeared to be very simple instructions from this page



      Set up SQL Server R Services (In-Database)



      When I got to the part about using the simple test



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


      it failed with




      Msg 39021, Level 16, State 1, Line 6 Unable to launch runtime for 'R'
      script. Please check the configuration of the 'R' runtime. Msg 39019,
      Level 16, State 1, Line 6 An external script error occurred: Unable
      to launch the runtime. ErrorCode 0x80070057: 87(The parameter is
      incorrect.). Msg 11536, Level 16, State 1, Line 6 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.




      So, I started my internet searching for known problems regarding R-Services and found this article - Known Issues for SQL Server R Services




      • I made sure that R-Services had been brought up to date with the Sql Server version (2016, CU2).

      • I read where long file names in the rlauncher.config file might cause problems, so I redirected my WORKING_DIRECTORY to C:TEMPR_SERVICES. However, I left the RHOME and MPI_HOME configuration entries untouched and still using long file names.

      • I made sure the Windows group SQLRUserGroup had full authority to that working directory folder.


      After every configuration change, I restarted both SQL Server and SQL Server Launchpad.



      However, every time I try to run the sample T-SQL test for R-Services, it fails and I see this entry in the rlauncher.log file




      [Error] Session creation failed with: Failed with 2 to get security
      for C:TEMPR_SERV~1MSSQLSERVER01




      I'm reaching out for help from others that might know what the problem is or any additional troubleshooting links.










      share|improve this question
















      SQL Server 2016 CU2 (Enterprise) here and one of my users has requested that we get R-Services installed.



      I followed what appeared to be very simple instructions from this page



      Set up SQL Server R Services (In-Database)



      When I got to the part about using the simple test



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


      it failed with




      Msg 39021, Level 16, State 1, Line 6 Unable to launch runtime for 'R'
      script. Please check the configuration of the 'R' runtime. Msg 39019,
      Level 16, State 1, Line 6 An external script error occurred: Unable
      to launch the runtime. ErrorCode 0x80070057: 87(The parameter is
      incorrect.). Msg 11536, Level 16, State 1, Line 6 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.




      So, I started my internet searching for known problems regarding R-Services and found this article - Known Issues for SQL Server R Services




      • I made sure that R-Services had been brought up to date with the Sql Server version (2016, CU2).

      • I read where long file names in the rlauncher.config file might cause problems, so I redirected my WORKING_DIRECTORY to C:TEMPR_SERVICES. However, I left the RHOME and MPI_HOME configuration entries untouched and still using long file names.

      • I made sure the Windows group SQLRUserGroup had full authority to that working directory folder.


      After every configuration change, I restarted both SQL Server and SQL Server Launchpad.



      However, every time I try to run the sample T-SQL test for R-Services, it fails and I see this entry in the rlauncher.log file




      [Error] Session creation failed with: Failed with 2 to get security
      for C:TEMPR_SERV~1MSSQLSERVER01




      I'm reaching out for help from others that might know what the problem is or any additional troubleshooting links.







      sql-server sql-server-2016 installation r-services






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 11 '17 at 22:37









      Paul White

      52.9k14281457




      52.9k14281457










      asked Nov 8 '16 at 19:49









      Scott HodginScott Hodgin

      17.6k21634




      17.6k21634






















          3 Answers
          3






          active

          oldest

          votes


















          2














          We wound up having to copy two folders (MSSQLSERVER01 and MSSQLSERVER02) from our Sql Server install directory, which for us was located here



          E:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLExtensibilityData


          We copied the above folders to the new WORKING_DIRECTORY (C:TEMPR_SERVICES) we had specified in the rlauncher.config file.



          After that, we were able to run the sample R_Services testing query



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





          share|improve this answer































            1














            If you upgraded to a monthly release of SQL Server 2016 and get ErrorCode 0x80004005 and the ‘unable to launch runtime’ message, you may want to check the NTFS permissions on the folder specified under WORKING_DIRECTORY in the rlauncher.config file. WARNING: it is dangerous to edit these permissions and / or change the path there. Please review https://msdn.microsoft.com/en-US/library/mt590869.aspx for details.






            share|improve this answer































              0














              Nothing of the solutions worked to make LaunchPad service run, except removing the whole SQL installation, -reboot-, then redownloading the installer from web, instructed to download the whole media to my computer and re-installed, -another reboot-, in my case I used SQL Server 2017 Developer edition. I left out Standalone Machine Learning Server from the installation.



              Launchpad Service running






              share|improve this answer








              New contributor




              Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "182"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f154637%2fproblem-getting-sql-server-2016-r-services-in-database-working%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                We wound up having to copy two folders (MSSQLSERVER01 and MSSQLSERVER02) from our Sql Server install directory, which for us was located here



                E:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLExtensibilityData


                We copied the above folders to the new WORKING_DIRECTORY (C:TEMPR_SERVICES) we had specified in the rlauncher.config file.



                After that, we were able to run the sample R_Services testing query



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





                share|improve this answer




























                  2














                  We wound up having to copy two folders (MSSQLSERVER01 and MSSQLSERVER02) from our Sql Server install directory, which for us was located here



                  E:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLExtensibilityData


                  We copied the above folders to the new WORKING_DIRECTORY (C:TEMPR_SERVICES) we had specified in the rlauncher.config file.



                  After that, we were able to run the sample R_Services testing query



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





                  share|improve this answer


























                    2












                    2








                    2







                    We wound up having to copy two folders (MSSQLSERVER01 and MSSQLSERVER02) from our Sql Server install directory, which for us was located here



                    E:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLExtensibilityData


                    We copied the above folders to the new WORKING_DIRECTORY (C:TEMPR_SERVICES) we had specified in the rlauncher.config file.



                    After that, we were able to run the sample R_Services testing query



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





                    share|improve this answer













                    We wound up having to copy two folders (MSSQLSERVER01 and MSSQLSERVER02) from our Sql Server install directory, which for us was located here



                    E:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLExtensibilityData


                    We copied the above folders to the new WORKING_DIRECTORY (C:TEMPR_SERVICES) we had specified in the rlauncher.config file.



                    After that, we were able to run the sample R_Services testing query



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






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Feb 10 '17 at 19:02









                    Scott HodginScott Hodgin

                    17.6k21634




                    17.6k21634

























                        1














                        If you upgraded to a monthly release of SQL Server 2016 and get ErrorCode 0x80004005 and the ‘unable to launch runtime’ message, you may want to check the NTFS permissions on the folder specified under WORKING_DIRECTORY in the rlauncher.config file. WARNING: it is dangerous to edit these permissions and / or change the path there. Please review https://msdn.microsoft.com/en-US/library/mt590869.aspx for details.






                        share|improve this answer




























                          1














                          If you upgraded to a monthly release of SQL Server 2016 and get ErrorCode 0x80004005 and the ‘unable to launch runtime’ message, you may want to check the NTFS permissions on the folder specified under WORKING_DIRECTORY in the rlauncher.config file. WARNING: it is dangerous to edit these permissions and / or change the path there. Please review https://msdn.microsoft.com/en-US/library/mt590869.aspx for details.






                          share|improve this answer


























                            1












                            1








                            1







                            If you upgraded to a monthly release of SQL Server 2016 and get ErrorCode 0x80004005 and the ‘unable to launch runtime’ message, you may want to check the NTFS permissions on the folder specified under WORKING_DIRECTORY in the rlauncher.config file. WARNING: it is dangerous to edit these permissions and / or change the path there. Please review https://msdn.microsoft.com/en-US/library/mt590869.aspx for details.






                            share|improve this answer













                            If you upgraded to a monthly release of SQL Server 2016 and get ErrorCode 0x80004005 and the ‘unable to launch runtime’ message, you may want to check the NTFS permissions on the folder specified under WORKING_DIRECTORY in the rlauncher.config file. WARNING: it is dangerous to edit these permissions and / or change the path there. Please review https://msdn.microsoft.com/en-US/library/mt590869.aspx for details.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 9 '16 at 5:42









                            Loretta ParksLoretta Parks

                            111




                            111























                                0














                                Nothing of the solutions worked to make LaunchPad service run, except removing the whole SQL installation, -reboot-, then redownloading the installer from web, instructed to download the whole media to my computer and re-installed, -another reboot-, in my case I used SQL Server 2017 Developer edition. I left out Standalone Machine Learning Server from the installation.



                                Launchpad Service running






                                share|improve this answer








                                New contributor




                                Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.

























                                  0














                                  Nothing of the solutions worked to make LaunchPad service run, except removing the whole SQL installation, -reboot-, then redownloading the installer from web, instructed to download the whole media to my computer and re-installed, -another reboot-, in my case I used SQL Server 2017 Developer edition. I left out Standalone Machine Learning Server from the installation.



                                  Launchpad Service running






                                  share|improve this answer








                                  New contributor




                                  Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.























                                    0












                                    0








                                    0







                                    Nothing of the solutions worked to make LaunchPad service run, except removing the whole SQL installation, -reboot-, then redownloading the installer from web, instructed to download the whole media to my computer and re-installed, -another reboot-, in my case I used SQL Server 2017 Developer edition. I left out Standalone Machine Learning Server from the installation.



                                    Launchpad Service running






                                    share|improve this answer








                                    New contributor




                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    Nothing of the solutions worked to make LaunchPad service run, except removing the whole SQL installation, -reboot-, then redownloading the installer from web, instructed to download the whole media to my computer and re-installed, -another reboot-, in my case I used SQL Server 2017 Developer edition. I left out Standalone Machine Learning Server from the installation.



                                    Launchpad Service running







                                    share|improve this answer








                                    New contributor




                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    share|improve this answer



                                    share|improve this answer






                                    New contributor




                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 18 mins ago









                                    RenaudRenaud

                                    1




                                    1




                                    New contributor




                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Renaud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Database Administrators Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f154637%2fproblem-getting-sql-server-2016-r-services-in-database-working%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

                                        Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

                                        How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...