Skip to main content

How to run SQL Server 2016 with In-Databasse R on Windows 2016 CTP5

For those who like me tried to run SQL Server 2016 with In-Database R might have run into the same problem as me: In-Database R or the LaunchPad service gives a timeout and won't start. I did several clean installations with different configuration options - for instance I like to put my data on another disk than the system disk - but in the end I tried to do the next, next, next, finish install to see if it something in the setup options is hard coded in there (yes, it happens developers!).

For some reason this problem is related to Windows 2016 and not on Windows 2012R2 and I hope the SQL Server team will soon resolve these issues because they are in one word a bit sloppy. 

There are 2 issues (maybe even 3 so I give this one also): 
  1. The R setup does not create the ExtensibilityLog directory in the "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log" directory
  2. The R setup sets the number of users in the SQL Server Launchpad service to 0
  3. it is possible that the 8dot3 names support - required for R - is not activated and the rlauncher.config file in the "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\" contains the long filename to the WORKING_DIRECTORY. 
The resolution for point 1 is simple:
 Go to the "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log" directory or the directory where you have chosen to install the SQL Server instance. Add the "ExtensibilityLog" directory and give the NT Service\MSSQLLaunchpad account or the account that you have given the right to run the service Full Access rights to this directory. 

The resolution for point 2 is also simple: 
Right click on the SQL Server Launchpad service and chose properties. Click on the Advanced tab and change the 0 to 20 or if you need more up to 100 users. 

The resolution for point 3 is also simple: 
Go to the "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\" or the directory where you chose to put your instance. Search for the rlauncher.config and edit it with NOTEPAD.If you did everything standard like me in the end you see something like this:

RHOME=C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES\
MPI_HOME=C:\Program Files\Microsoft MPI\
INSTANCE_NAME=MSSQLSERVER
TRACE_LEVEL=1
JOB_CLEANUP_ON_EXIT=1
USER_POOL_SIZE=0
WORKING_DIRECTORY=C:\PROGRA~1\MICROS~1\MSSQL1~1.MSS\MSSQL\EXTENS~1\

But in you case the last line is using the long directory names and that is exactly what R does not support so it will never find this place.

If you want to check if 8dot3 filenames is enabled on the C: drive or the drive where you have put your instance:

PS C:\Windows\system32> FSUTIL.EXE 8dot3name query C: The volume state is: 0 (8dot3 name creation is enabled). The registry state is: 2 (Per volume setting - the default).  

Based on the above two settings, 8dot3 name creation is enabled on C:
To Set it:

PS C:\Windows\system32> FSUTIL.EXE 8dot3name set C: 2
The volume state is: 0 (8dot3 name creation is enabled). 
The registry state is: 2 (Per volume setting - the default).
 
More info:
  • The DefaultValue can have the following values:
    • 0: Enables 8dot3 name creation for all volumes on the system.
    • 1: Disables 8dot3 name creation for all volumes on the system.
    • 2: Sets 8dot3 name creation on a per volume basis.
    • 3: Disables 8dot3 name creation for all volumes except the system volume.
  • When a VolumePath is specified, the specified volumes on disk flag 8dot3name properties will be set to enable 8dot3 name creation for a specified volume (0) or set to disable 8dot3 name creation on the specified volume (1).
    You must set the default file system behavior for 8dot3 name creation to the value 2 before you can enable or disable 8dot3 name creation for a specified volume. 
That took me some time to figure it out also because the SQL Server team now brings R integration as a black box. R works completely different as other Windows programs and from an administrator point of view there is little known if something goes wrong. 

If you want to check the 8dot3 filenames of the directory you need to use:*

dir /x

If there are no 8dot3 names for the directory you need to create them using

mklink /J  D:\Progra~1 "D:\Program Files" 

and so on for all the levels that have longer file names. Normally this is all managed by the installer. It sets the 8dot3 names support and then create the directories

Looking at all this I do not understand why Microsoft not added long file names support to their version of R. Sounds logical.   

More info can be found here:
http://henkvandervalk.com/introducing-microsoft-sql-server-2016-r-services 

https://social.msdn.microsoft.com/Forums/en-US/777bb5c5-5fdd-440c-8e61-a459ee9f76a9/sql-server-launchpad-service-wont-start?forum=SQLServer2016Preview 

I hope it helps :-)

Comments

Popular posts from this blog

Privacy and the liberty to express yourself on LinkedIn

Unaware that LinkedIn has such a strong filtering policy that it does not allow me posting a completely innocent post on a Chinese extreme photography website I tried to post the following: "As an Mpx lover I was suprised to find out that the M from Million is now replaced by the B from Billion. This picture is 24 Bpx! Yes you read this well, 24 billion pixels.  Searching on the picture I stumbled on a fellow Nikon lover. If you want to search for him yourself you can find him here: http://www.bigpixel.cn/t/5834170785f26b37002af46a " In my eyes nothing is wrong with this post, but LinkedIn considers it as offending. I changed the lover words, but I could not post it.  Even taking a picture and post it will not let this pass:  Or my critical post on LinkedIn crazy posting policy: it will not pass and I cannot post it.  The technology LinkedIn shows here is an example what to expect in the near future.  Newspapers will have a unified reporting using

Windows Server 2016 with ... XBox extensions !!!

Microsoft must have been thinking that the live of a Windows administrator gets so boring that they need a distraction and they have integrated the XBox Live extensions standard in Windows Server 2016.  No kidding: take a look. I did not select it as a feature and it is there. As you can see the XBox Live service is started automatically even in mode manual (see error log).  To my opinion these 3 XBox Live services should never be available on a server. Unless the server is part of the XBox Live platform of cause but honestly I don't think that Microsoft will allow that.  Every IT manager with a serious Windows production environment would fire any administrator playing XBox Live on the production servers. So though it might be tempting don't do it Windows administrator. It is a trap! :-)