Update-DbaInstance extra support for R & Python installs
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.
Still want to work on this?
If it is part of the base installer then yes it would be something we could support.
@claude please research this and make a PR
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:
Find-DbaMLServicesCabFile.ps1- Searches for R and Python CAB files (SRO_.cab, SRS_.cab, SPO_.cab, SPS_.cab) in the installer directoryTest-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
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:
- dbatools detects if R/Python components are installed on the target instance
- Searches for CAB files in the same folder as the KB installer executable
- If found, copies CAB files to the extraction directory where setup.exe can use them
- 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.