You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to execute the powershell script SQLR\Campaign_Optimization.ps1 on MSSQL 2017. In the step 3b, I'm getting this error
Invoke-Sqlcmd : A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
An external script error occurred:
During startup - Warning message:
In setJsonDatabasePath(system.file("extdata/capabilities.json", :
bytecode version mismatch; using eval
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
Could not open data source.
Error in doTryCatch(return(expr), name, parentenv, handler) :
Could not open data source.
Calls: source ... tryCatch -> tryCatchList -> tryCatchOne -> doTryCatch -> .Call
Error in execution. Check the output for more information.
Error in eval(expr, envir, enclos) :
Error in execution. Check the output for more information.
Calls: source -> withVisible -> eval -> eval -> .Call
Execution halted
STDOUT message(s) from external script:
[Microsoft][ODBC Driver Manager] Connection not open
ODBC Error in SQLDisconnect
At D:\mssql-r\r-server-campaign-optimization\SQLR\Campaign_Optimization.ps1:79 char:5
I tried to execute the powershell script SQLR\Campaign_Optimization.ps1 on MSSQL 2017. In the step 3b, I'm getting this error
Invoke-Sqlcmd : A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
An external script error occurred:
During startup - Warning message:
In setJsonDatabasePath(system.file("extdata/capabilities.json", :
bytecode version mismatch; using eval
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
Could not open data source.
Error in doTryCatch(return(expr), name, parentenv, handler) :
Could not open data source.
Calls: source ... tryCatch -> tryCatchList -> tryCatchOne -> doTryCatch -> .Call
Error in execution. Check the output for more information.
Error in eval(expr, envir, enclos) :
Error in execution. Check the output for more information.
Calls: source -> withVisible -> eval -> eval -> .Call
Execution halted
STDOUT message(s) from external script:
[Microsoft][ODBC Driver Manager] Connection not open
ODBC Error in SQLDisconnect
At D:\mssql-r\r-server-campaign-optimization\SQLR\Campaign_Optimization.ps1:79 char:5
The user I used for this execution is the DB owner and I granted script execution permissions as mentioned here
https://docs.microsoft.com/en-us/sql/advanced-analytics/security/user-permission?view=sql-server-ver15
Can you help me with a work around ?