Sample Header Ad - 728x90

SQL Server 2016 R Statistics: can't find function

0 votes
0 answers
413 views
I'm trying to get R Statistics running on my Dev server. I'm using this microsoft tutorial . I have the default installation of R Analytics as provided my the SQL Server installation: > C:\Program Files\Microsoft SQL\Server\MSSQL13.MSSQLSERVER\R_SERVICES\ And I also have the Microsoft R Client 3.4.3 which contains the RX functions installed to: > C:\Program Files\Microsoft\R Client We have a Tutorial database, with test data, R is enabled and I can do "hello world". Everything works up until Step 3.3 Code Step 3. > --Save Linear model to table > DECLARE @model VARBINARY(MAX); EXEC generate_rental_R_native_model "linear", @model OUTPUT; INSERT INTO > rental_models (model_name, native_model, lang) VALUES('linear_model', > @model, 'R'); When I run it I get the following error: > Msg 39004, Level 16, State 20, Line 59 A 'R' script error occurred > during execution of 'sp_execute_external_script' with HRESULT > 0x80004004. Msg 39019, Level 16, State 1, Line 59 An external script > error occurred: Error in eval(expr, envir, enclos) : could not > find function "rxSerializeModel" Calls: source -> withVisible -> eval > -> eval > > Error in ScaleR. Check the output for more information. Error in > eval(expr, envir, enclos) : Error in ScaleR. Check the output for > more information. Calls: source -> withVisible -> eval -> eval -> > .Call Execution halted I'm on SQL 2016 SP2 CU3, so I know I don't have the predict() function but everything up until that point should work. If I run RGUI I can prove that rxSerializeModel is there. This works: myIris Msg 39004, Level 16, State 20, Line 10 A 'R' script error occurred > during execution of 'sp_execute_external_script' with HRESULT > 0x80004004. Msg 39019, Level 16, State 1, Line 10 An external script > error occurred: Error in path.expand(new) : could not find function > "rxSqlLibPaths" Calls: source ... .libPaths -> Sys.glob -> path.expand > -> path.expand > > Error in ScaleR. Check the output for more information. Error in > eval(expr, envir, enclos) : Error in ScaleR. Check the output for > more information. Calls: source -> withVisible -> eval -> eval -> > .Call Execution halted Why can't SQL see it? Is it a path issue? How do I know where SQL is looking for libraries?
Asked by Sir Swears-a-lot (3253 rep)
Dec 11, 2018, 02:34 AM
Last activity: Dec 11, 2018, 08:47 PM