# Issues installing patches on SQLserver 2008

There are multiple issues with a server I manage, we cannot start management studio on it and when we try to install patches to SQL Server the setup never shows up.

I run the patch as an administrator, it shows me that some files are being extracted to a temp folder, then a CMD window opens for a split second and closes immediately after.

I have looked around a bit to find a solution but can't quite decide where to start from.

Here is a link of someone saying he ran caspol.exe to fix a somewhat similar issue

What's caspol anyways? Having never used it I don't really want to create more issues by not knowing what it should be used for.0

Here is my server's select @@version query result :

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86) Mar 29 2009 10:27:29 Copyright (c) 1988-2008 Microsoft Corporation Standard Edition on Windows NT 6.0 (Build 6002: Service Pack 2) (VM)

The server is a windows server 2008 32-bit

The patch setup creates the following log when it fails :

03/17/2016 13:58:13.308 ======================================================================
03/17/2016 13:58:13.309 Setup launched
03/17/2016 13:58:13.310 Attempting to determine media source
03/17/2016 13:58:13.311 Media source value not specified on command line argument.
03/17/2016 13:58:13.390 Setup is launched from media directly so default the value to the current folder.
03/17/2016 13:58:13.391 Media source: g:\e89cdf338f18c1307f\
03/17/2016 13:58:13.391 Attempt to determine media layout based on file 'g:\e89cdf338f18c1307f\mediainfo.xml'.
03/17/2016 13:58:13.433 The folder 'g:\e89cdf338f18c1307f\' does not contain a valid media info file 'mediainfo.xml'.
03/17/2016 13:58:13.434 Setup closed with exit code: 0x84C4001E
03/17/2016 13:58:13.484 ======================================================================


It might be good to add that the windows search is not working, as you may observe in the following image :

Maybe the setup is trying to look for files but fails as it cannot search for them ?

If this was your server, what would be the first step of troubleshooting you'd go through ?

• The first thing would be to wipe it and get rid of whatever Win9x operating system that is. How many decades before this person becomes interested in a fresh start? – Aaron Bertrand Mar 17 '16 at 19:19
• This server is part of a very wide farm and the person that created it has left for retirement years ago. My take on this would also be to wipe it, be it my choice. – A_V Mar 17 '16 at 19:21
• Why do you need Management Studio on that server? – Aaron Bertrand Mar 17 '16 at 19:24
• I do not, I can login from elsewhere easily but I do need to install patches there and they do not start. As stated in the post the setup starts, shows it's extracting temp files and then open a CMD prompt that closes immediately. – A_V Mar 17 '16 at 19:26
• I wonder if you could try and install the patches via the command line from the server, similar to this: <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances – rvsc48 Mar 17 '16 at 19:49

Here is a good place to start: https://support.microsoft.com/en-us/kb/969052

I ran into a similar issue as you and this allowed me to fix it. The script on that page ended up showing me all the items that needed to be fixed. In my case, the original install happened over a network share, which no longer existed. Using the output from the script, I manually copied the items to the local Windows installer cache.

Here is example of output of what it found that I did not have to fix:

================================================================================
PRODUCT NAME   : SQL Server 2008 R2 SP2 BI Development Studio
================================================================================
Product Code: {312E8540-0799-45D5-A02E-DFB8FCA93CCA}
Version     : 10.53.6000.34
Most Current Install Date: 20151113
Target Install Location:
Registry Path:
HKEY_CLASSES_ROOT\Installer\Products\0458E21399705D540AE2FD8BCF9AC3AC\SourceList
Package    : sql_bids.msi
Install Source: \x64\setup\
LastUsedSource: n;1;\\server\with\path\that\no\longer\exists\SQL Server 2008 R2 Enterprise\x64\setup\

!!!! sql_bids.msi DOES NOT exist on the path in the path \\server\with\path\that\no\longer\exists\SQL Server 2008 R2 Enterprise\x64\setup\ !!!!

Action needed, re-establish the path to \\server\with\path\that\no\longer\exists\SQL Server 2008 R2 Enterprise\x64\setup\

Installer Cache File: C:\Windows\Installer\12b7423e.msi

Package exists in the Installer cache, no actions needed.
Any missing packages will update automatically if needed assuming that
the LastUsedSource exists.

Should you get errors about C:\Windows\Installer\12b7423e.msi or \\server\with\path\that\no\longer\exists\SQL Server 2008 R2 Enterprise\x64\setup\sql_bids.msi then you
may need to manually copy the file, if file exists replace the problem file,
Copy and paste the following command line into an administrative command prompt:

Copy "\\server\with\path\that\no\longer\exists\SQL Server 2008 R2 Enterprise\x64\setup\sql_bids.msi" C:\Windows\Installer\12b7423e.msi


For that item, I did nothing. However, here is an example of something that it needed:

SQL Server 2008 R2 SP2 Database Engine Shared Patches Installed
--------------------------------------------------------------------------------
Display Name:    GDR 1617 for SQL Server Database Services 2008 Core Shared (64-bit) (KB2494088)
KB Article URL:  http://support.microsoft.com/?kbid=2494088
Install Date:    20120227
Uninstallable:   1
Patch Details:
PackageName:   sql_engine_core_shared.msp
Patch LastUsedSource: n;1;c:\be3c4c3dfe15678dec7048ab989c4f\x64\setup\sql_engine_core_shared_msi\
Installer Cache File Path:     c:\Windows\Installer\f696075.msp

!!!! c:\Windows\Installer\f696075.msp package DOES NOT exist in the Installer cache. !!!!

Action needed, recreate or re-establish path to the directory:
c:\be3c4c3dfe15678dec7048ab989c4f\x64\setup\sql_engine_core_shared_msi\ then rerun this script to update installer cache and results
The path on the line above must exist at the root location to resolve
this problem with your msi/msp file not being found or corrupted,
In some cases you may need to manually copy missing files or manually
replace the problem file,

Copy "c:\be3c4c3dfe15678dec7048ab989c4f\x64\setup\sql_engine_core_shared_msi\sql_engine_core_shared.msp" c:\Windows\Installer\f696075.msp

Replace the existing file if prompted to do so.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.39622339606285095, "perplexity": 5038.453475792035}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-10/segments/1614178361723.15/warc/CC-MAIN-20210228175250-20210228205250-00363.warc.gz"}