【问题标题】:Can't run R script in SSMS after fresh install全新安装后无法在 SSMS 中运行 R 脚本
【发布时间】:2023-03-29 14:27:01
【问题描述】:

在安装 SQL Server 2019 期间选择 R Services 时试图找出安装出现的问题。我尝试重新启动 SQL 服务和 Launchpad,但没有任何结果。我还尝试将外部资源池的 RAM 分配空间增加到 50%,而不是默认的 20%。尝试四处寻找这个错误,除了另一个没有答案的comment on sqlauthority.com 之外,我看不到任何人有同样的错误。

尝试运行此脚本只是为了确认 R 已安装在服务器上:

EXECUTE 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

产生这个错误:

Msg 39012, Level 16, State 14, Line 16 
Unable to communicate with the runtime for 'R' script for request id: DCF675C1-D581-415C-937E-A4D01E07FFE4. Please check the requirements of 'R' runtime.

STDERR message(s) from external script:  
Error: .onLoad failed in loadNamespace() for 'RevoScaleR', details:   
call: inDL(x, as.logical(local), as.logical(now), ...)   
error: fatal error: RevoScaleR cannot be used in this R session anymore, if possible restart R session error code -1066598274, detailed error message might be found in: (standard output unavailable) and (standard error output unavailable) 
Execution halted 
exception while shutting down RxClientPipe: cannot write to BxlServer, child process is dead

任何帮助将不胜感激!

【问题讨论】:

  • Bxlserver 进程是否正在运行?
  • 我不认为BxlServer是一个在后台运行的进程?我相信可执行文件是从 Launchpad 服务调用的,而该服务又由存储过程 sp_execute_external_scripts 调用

标签: sql r sql-server ssms


【解决方案1】:

所以我真的让它工作了。但请注意,我尝试了许多不同的修复程序,但在我找到适合我的服务器情况的方法之前,它们都不起作用。我发现的最佳指南是 Niels Berglund 的这篇博文,发现 here。他几乎经历了我经历的所有事情,即使我们得到的错误是不同的。虽然,一旦我移动了“ExtensibilityData”文件夹,我最终得到了与 Niels 相同的错误!

但是,似乎可以解决我的问题的简单解决方案是将 SQL Server 更新到 CU8。我尝试了所有方法(请参见下面的链接),但最终是因为 MS 发布了一个带有错误的 SQL Server 2019 版本!我仍然需要返回并更正我创建的所有文件夹安全混乱,但我认为只要 MSSQLLaunchpad 有权访问正确的文件夹并且 R 和 Python 配置文件指向一个“好”文件夹,那么它应该都可以工作出去。

尝试的修复:

【讨论】:

    猜你喜欢
    • 2016-02-06
    • 2021-11-23
    • 2017-08-25
    • 1970-01-01
    • 1970-01-01
    • 2014-08-26
    • 1970-01-01
    • 1970-01-01
    • 2016-12-29
    相关资源
    最近更新 更多