无法与 SQL Server 2017 中 'R' 脚本的运行时通信

Unable to communicate with the runtime for 'R' script in SQL Server 2017

我无法让 R 在一台服务器上的 SQL Server 2017 上工作(我已经在大约 8 台其他服务器上成功安装了它)。我已经安装了最新的累积更新。

当我执行一个运行简单的 hello world R 脚本的存储过程时,我可以看到 LaunchPad.exe 和 rterm.exe 都是 运行。然而,60 秒后,我收到以下错误:

Msg 39012, Level 16, State 1, Line 0
Unable to communicate with the runtime for 'R' script. Please check the requirements of 'R' runtime.
STDERR message(s) from external script: Fatal error: creation of tmpfile failed -- set TMPDIR suitably?

这是失败的脚本:

EXEC sp_execute_external_script 
@language =N'R', @script=N'print("hello")';

关于解决此错误我需要做什么的任何想法?

我的假设是您在安装机器学习服务后应用了 CU?如果是这样,则 CU 以某种方式弄乱了文件夹权限。

我写了一篇关于如何修复它的博客 post here。博客 post 是关于 CU7 的,但它应该适用于任何 CU。

我不保证它能正常工作,因为我在 ML 服务停止工作时看到了其他问题,对于这些情况,解决方法是修复 SQL 安装。

问题是没有为 SQL 服务器启用命名管道。启用它并重新启动服务解决了我的问题。