{"id":85814,"date":"2019-12-11T11:22:04","date_gmt":"2019-12-11T11:22:04","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=85814"},"modified":"2019-12-11T11:22:04","modified_gmt":"2019-12-11T11:22:04","slug":"service-pack-fix-missing-msi-issue","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/service-pack-fix-missing-msi-issue\/","title":{"rendered":"Service Pack &#8211; Fix Missing MSI issue"},"content":{"rendered":"<p>You know what it\u2019s like, you are running a service pack on SQL Server and 99.9% of the time it all runs smoothly but that odd 0.1% of the time when it doesn\u2019t is usually in the middle of the night with no one around to call on.<\/p>\n<p>Well to spare you some pain I\u2019ve discovered a really cool utility to help mitigate risk.<\/p>\n<p>I was recently doing a service pack, I\u2019d run it on the entire test estate and half of the Production estate, I\u2019d used Pinal Dave\u2019s really useful <a href=\"https:\/\/blog.sqlauthority.com\/2017\/03\/04\/sql-server-apply-patch-alwayson-availability-group-configuration\/\">AG check list<\/a> and been really overcautious, I\u2019d finished integrity checks on all databases, I\u2019d backed everything up and even had a snapshot of the server completed.<\/p>\n<p>When I clicked on the service pack I got the error\u00a0 \u201cmissing MSI\u201d sorry I don\u2019t have the screen dump or the full error message because at the time of trying to fix it I did\u2019t think to take a copy \u2639<\/p>\n<p>I understand the prime reason for this happening is that the installer files had been removed.<\/p>\n<p>Anyway after a lot of bingling I discovered this <a href=\"https:\/\/blogs.msdn.microsoft.com\/psssql\/2018\/01\/24\/sql-setup-toolsuite-introduction-1-fixmissingmsi\/\">blog<\/a> from Microsoft which gives you the link to download a really cool little utility that can help you fix the missing MSIs, or at least help you identify them.<\/p>\n<p>I would strongly recommend running the utility while you are preparing for service patching so that you can resolve any issues rather than having to deal with it in the middle of the night.<\/p>\n<p>When you run the utility it will ask you for the installer drive, by default this is c:\\windows\\installer it may return something like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-85815\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2019\/12\/missingmsi.png\" alt=\"\" width=\"572\" height=\"209\" \/><\/p>\n<p>Hopefully it will return an empty table, however if it does return data we know what to do to fix it.<\/p>\n<p>You can see that in the screen dump I\u2019ve fixed two missing msi\u2019s and failed to fix 3.\u00a0 However this does give us really useful information.\u00a0 We know what the msi we are missing relates to and the number SQL Server has given to it.\u00a0 SQL Server randomizes the CachedMSIMsp so you can\u2019t just find that one.<\/p>\n<p>Instead what you have to do to fix this is search out the package name, sql_is.msi, by the time I\u2019d got to this point\u00a0 I\u2019d downloaded the version of SQL Server I was working with and tried a repair which had failed.\u00a0 Search for the package name, so looking at the first one it\u2019s sql_is.msi, copy it to c:\\windows\\installer and rename it to, in our case, 83717132.msi, repeat this for all missing msi\u2019s and then you should be able to re-run the service pack successfully.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You know what it\u2019s like, you are running a service pack on SQL Server and 99.9% of the time it all runs smoothly but that odd 0.1% of the time when it doesn\u2019t is usually in the middle of the night with no one around to call on. Well to spare you some pain I\u2019ve&#8230;&hellip;<\/p>\n","protected":false},"author":10747,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[57570],"class_list":["post-85814","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/85814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/10747"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=85814"}],"version-history":[{"count":1,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/85814\/revisions"}],"predecessor-version":[{"id":85816,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/85814\/revisions\/85816"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=85814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=85814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=85814"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=85814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}