Seasonal Package (X-13) RRS feed

  • Question

  • I am attempting to call the function seas() from the "seasonal" package.

    Example code: 

    Sys.setenv("X13_PATH" = "C:/Program Files/Microsoft SQL Server/MSSQL13.SQLEXPRESS/R_SERVICES/library/x13binary/bin");
    m <- seas(AirPassengers, 
              transform.function = "log", 
              regression.variables = "td",
              arima.model = "(0 1 1)(0 1 1)12",
              forecast = ""

    However, I have this error returned:

    Loading required package: seasonal
    Error: X-13 has run but produced no data

    The code works within R.exe in the SQL directory without issue. 

    I have set permissions for all users and applications for full control for the x13 path.

    I would be grateful for any ideas.

    Tuesday, July 4, 2017 3:45 PM


  • Root Cause: The data file created as a temporary file by executing the external R script in sqlserver has a very LONG name. This path is specified in the .spc file read by x13ashtml.exe process which sets the limit for the data file name to be 133.


    1. Create a symbolic link to the ExtensibilityData folder

    mklink /d c:\extensibilitydata-<full instance name> "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData"


    mklink /d c:\extensibilitydata-MSSQL13.MSSQLSERVER "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData"  


    1. Edit C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\rlauncher.config,

    Set WORKING_DIRECTORY to be this newly created symbolic link.




    1. Restart the Sql Server Launchpad Service. In an elevated command prompt execute: net stop mssqllaunchpad & net start mssqllaunchpad
    • Marked as answer by SimonKJones Friday, September 29, 2017 2:28 PM
    Friday, September 29, 2017 2:28 PM