dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Update-DbaInstance extra support for R & Python installs

Open garethnewman opened this issue 6 years ago • 4 comments

For SQL 2017 ML (R & Python) - they release separate CAB files for the R & Python parts of the engine. Update-DbaInstance doesn't know what to do with these.

I think it will be as simple as putting the files in the same directory as the installer, but will need logic added so files are not being copied over unless they are needed.

if version = 2017 check if R & Python are installed if they are, also look for the CU CAB files and copy them along with the engine CU exe. If the files are not found, warn the user we can't install the engine update (unless they have internet access, it pulls it down)

from that part on I think the MS installer has it covered.

Will investigate.

garethnewman avatar Jun 18 '19 14:06 garethnewman

Still want to work on this?

andreasjordan avatar Jun 11 '23 11:06 andreasjordan

If it is part of the base installer then yes it would be something we could support.

wsmelton avatar Jun 11 '23 14:06 wsmelton

@claude please research this and make a PR

potatoqualitee avatar Nov 07 '25 19:11 potatoqualitee

Claude finished @potatoqualitee's task —— View job • claude/issue-5780-20251107-1932 • Create PR ➔


Implementation Complete ✓

I've successfully implemented support for SQL Server 2017 Machine Learning Services CAB files in Update-DbaInstance!

Changes Made

New Helper Functions:

  1. Find-DbaMLServicesCabFile.ps1 - Searches for R and Python CAB files (SRO_.cab, SRS_.cab, SPO_.cab, SPS_.cab) in the installer directory
  2. Test-DbaMLServicesInstalled.ps1 - Detects if SQL Server 2017 has ML Services components installed

Updated Functions: 3. Update-DbaInstance.ps1 - Added logic to:

  • Detect SQL 2017 instances with ML Services installed
  • Search for CAB files in the same directory as the KB installer
  • Track CAB files with the upgrade details
  • Warn users if ML Services are detected but CAB files are missing
  1. Invoke-DbaAdvancedUpdate.ps1 - Added logic to:
    • Copy CAB files to the extraction directory along with the setup files
    • SQL Server setup automatically uses these CAB files during installation

How It Works

When updating SQL Server 2017 with ML Services:

  1. dbatools detects if R/Python components are installed on the target instance
  2. Searches for CAB files in the same folder as the KB installer executable
  3. If found, copies CAB files to the extraction directory where setup.exe can use them
  4. If not found, warns the user (update may still succeed if the server has internet access)

This matches the requirement from the issue: "I think it will be as simple as putting the files in the same directory as the installer, but will need logic added so files are not being copied over unless they are needed."

Usage

Users should place the R and Python CAB files for their cumulative update in the same directory as the KB installer:

\\network\share\SQL2017\
  SQLServer2017-KB5000000-x64.exe
  SRO_3.5.2.125_1033.cab
  SRS_9.4.7.25_1033.cab
  SPO_9.4.7.25_1033.cab
  SPS_9.4.7.25_1033.cab

Then run Update-DbaInstance as usual - it will automatically detect and copy the CAB files.

--- | Branch: claude/issue-5780-20251107-1932

claude[bot] avatar Nov 07 '25 19:11 claude[bot]