SQL Server 2017 Machine Learning Installation Failure

  • I'm sharing what I've learned installing SQL Server 2017 RTM on a newly built Windows Server 2016 VM. When I did an install including setting separate drives for data, log, tempdb and backup, R and Python scripts both failed. These is the steps I went though to fix the issue and get them working.

    1. Clean Windows Server 2016 with latest updates installed VM with 64GB RAM, 6 cores
    2. Create the following structure for data, logs, tempdb and backup
    Data: S:\MSSQL\Data
    Logs: G:\MSSQL\Logs
    Tempdb: T:\MSSQL\Data
    Backups: Z:\MSSQL\Backups
    3. Install SQL Server 2017 Developer Edition
    Services on AD accounts
    Installation directory on drive F: (C: is OS only)
    Point data, logs, tempdb and backups as above
    Install database engine, Machine Learning (R and Python)
    4. Install SSMS 2017
    5. Open query window in SSMS 2017 and run the following to enable external scripts:
    EXEC sys.sp_configure @configname = 'external scripts enabled', @configvalue = 1
    RECONFIGURE WITH OVERRIDE;

    6. Restarted SQL Server Servcie.
    7. Run the following scripts to check if R and Python are configured correctly:
    -- Do R scripts work?
    EXEC 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));

    -- Do Python scripts work?
    EXEC sp_execute_external_script @language =N'Python',
    @script=N'OutputDataSet=InputDataSet',
    @input_data_1 = N'SELECT 1 AS col;'

    8. Get the following error:
    Msg 39021, Level 16, State 1, Line 1
    Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime.
    Msg 39019, Level 16, State 2, Line 1
    An external script error occurred:
    Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).
    Msg 39021, Level 16, State 1, Line 1
    Unable to launch runtime for 'Python' script. Please check the configuration of the 'Python' runtime.
    Msg 39019, Level 16, State 2, Line 1
    An external script error occurred:
    Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).
    9. Changing the data directory to S:\MSSQL\Data means the ExtensibilityData directory changed to S:\MSSQL\Data\MSSQL14.MSSQLSERVER\MSSQL\ExtensibilityData
    10. MSSQLLaunchpad did not have permissions to the path. Gave NT Service\MSSQLLaunchpad full control of the directory. Note that giving MSSQLLaunchpad full control of S:\MSSQL\ and setting it to apply to all subdirectories and files did not work. I had to go to the ExtensibilityData directory and give MSSQLLaunchpad full control there.
    11. Restarted the SQL Server service and reran the test scripts and both R and Python scripts ran without errors.

    I hope this helps someone else. And please point out anything I may have done wrong during the install to cause my own pain (wouldn't be the first time). This is my 3rd install but the first clean install. The last 2 were on a server where I first uninstalled SQL Server 2016 so my initial thought was that maybe it was do to something left from the original installation.

    -Tom

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply