sous-chefs/sql_server

SSMS Latest Version on Sql2016

Opened this issue · 1 comments

Chef-client version

13.1.31

Platform Details

Windows 2016 with Sql 2016

Scenario:

Want to install SSMS 17.8 version

Steps to Reproduce:

server_install 'Install SQL Server 2016 Evaluation' do
source_url 'C:\Sources\SQL 2016 Eval\setup.exe'
version '2016'
package_checksum 'checksum for the setup.exe'
accept_eula true
instance_name 'MSSQLSERVER'
feature %w(SQLENGINE SSMS ADV_SSMS)
end

Expected Result:

SSMS should be installed with latest version 17.8

Actual Result:

I want to know whether above recipe will install SSMS 17.8.. I am sure in SQL 2016 SSMS wont install as part of SQL installation and it should be done separately. I need a recipe to install SSMS 17.8 version.

This cookbook doesn't seem to be able to install SSMS or Reporting Services since MS no longer bundles them with the installer. You'd think they could just do what Visual Studio installer does but alas. So I found the version list here.

Latest is 18.7.1 and the download link they give you is https://go.microsoft.com/fwlink/?linkid=2147207 which of course hides the real link https://download.microsoft.com/download/2/d/1/2d12f6a1-e28f-42d1-9617-ac036857c5be/SSMS-Setup-ENU.exe

You can find it by using the Network Tab in the DevConsole to find where the request is actually going
image

So with the exe in hand we grab the hash using Powershell.

get-filehash .\SSMS-Setup-ENU.exe -algo sha256

Algorithm       Hash                                                            
---------       ----                                                                
SHA256          27FBEAD01257513F87C619765C06611B2F4F53C7C6C2B9F1DC3EDF3ACE14295D

Now we need to figure out how to install this thing unattended from these docs.

And then we're left with this naive recipe which I've named management.rb

package "SSMS" do
  source "https://download.microsoft.com/download/2/d/1/2d12f6a1-e28f-42d1-9617-ac036857c5be/SSMS-Setup-ENU.exe"
  checksum "27FBEAD01257513F87C619765C06611B2F4F53C7C6C2B9F1DC3EDF3ACE14295D"
  timeout node['sql_server']['server']['installer_timeout']
  installer_type :custom
  options "/Quiet"
  action :install
  notifies :request_reboot, 'reboot[sql server install]'
  returns [0]
end

And the default install location should be "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\Application" per this Stackoverflow answer
https://stackoverflow.com/a/27830471

Supposing someone wanted to integrate this into the cookbook properly I'd look at all the server.rb files for inspiration in managing all the available versions.