I was trying out new R feature in SQL 2016 and encountered this error so I thought I would document this issue.
- Locate rlauncher config file: (this is used by the MSSQL Launch pad service)
- Its normally located in the Binn folder which is available in instance root directory in my case D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn
- View the contents of rlauncher and check the working directory which is where we are having issues creating temp dir.
- R does not like spaces in the working directory
3. Create a folder in C:\ called temp “C:\temp”
4. Change the working directory to c:\temp
5. Grant permissions for the service MSSQLaunchpad service account in my case its NT Service\MSSQLaunchpad
Restart the SQL server services and SQL Launch pad services.
We can also fix this by using short paths by replacing the working directory with a short path
Eample below cmd will give us the short path for the location
cmd /c for %A in (“D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData”) do @echo %~sA