Fix SQL Server In-Place Upgrade Error: msodbcsql.msi Missing

Fix SQL Server In-Place Upgrade Error: msodbcsql.msi Missing

During a SQL Server in-place upgrade, SQL Server Setup may stop during the Upgrade Progress stage with the following Windows Installer error:

The feature you are trying to use is on a network resource that is unavailable.

The installer then asks for msodbcsql.msi. This can happen even when Microsoft ODBC Driver 17 for SQL Server is already installed.



Figure 1: SQL Server Setup pauses during Upgrade Progress and requests the missing msodbcsql.msi installation package.

The most common reason is that Windows Installer cannot locate the original installation source. For example, it may look for a temporary folder such as:

C:\Windows\TEMP\IXP000.TMP\

Windows Installer may retain a cached MSI package under:

C:\Windows\Installer\

This article explains how to identify the installed ODBC driver version, locate the cached MSI package, and troubleshoot the missing-installer prompt.

1. Check the Installed ODBC Driver Version

Open PowerShell as Administrator and run the following command. This checks the Windows uninstall registry without triggering the Windows Installer consistency checks associated with Win32_Product.

$paths = @(
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)

Get-ItemProperty $paths -ErrorAction SilentlyContinue |
    Where-Object {
        $_.DisplayName -match "ODBC Driver \d+ for SQL Server"
    } |
    Select-Object DisplayName, DisplayVersion, InstallLocation

Review the output to confirm whether Microsoft ODBC Driver 17 for SQL Server is installed. The displayed version depends on the driver release installed on the server.

2. Locate Cached MSI Packages

Windows Installer may store cached MSI packages in C:\Windows\Installer\. Their filenames may be randomly generated, so do not expect every cached package to be named msodbcsql.msi.

Get-ChildItem "C:\Windows\Installer" -Filter "*.msi" -File |
    Select-Object FullName, Length, LastWriteTime

Do not select an arbitrary MSI based only on its filename or modification date.

3. Identify the Correct Cached MSI

Windows Installer product registration may contain the cached package path in the LocalPackage property. Run this PowerShell command to look for the registered ODBC Driver 17 product:

$installerPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData"

Get-ChildItem $installerPath -ErrorAction SilentlyContinue |
    ForEach-Object {
        $productsPath = Join-Path $_.PSPath "Products"

        if (Test-Path $productsPath) {
            Get-ChildItem $productsPath -ErrorAction SilentlyContinue |
                ForEach-Object {
                    $installProperties = Join-Path $_.PSPath "InstallProperties"

                    if (Test-Path $installProperties) {
                        $product = Get-ItemProperty $installProperties `
                            -ErrorAction SilentlyContinue

                        if ($product.DisplayName -like "*ODBC Driver 17*") {
                            [PSCustomObject]@{
                                ProductName   = $product.DisplayName
                                Version       = $product.DisplayVersion
                                InstallSource = $product.InstallSource
                                LocalPackage  = $product.LocalPackage
                            }
                        }
                    }
                }
        }
    }

If the product registration is available, inspect the returned LocalPackage path and verify that the file exists.

Test-Path "C:\Windows\Installer\<cached-package>.msi"

Replace the placeholder with the actual path returned by the previous command. If no result is returned, do not assume that the driver is missing; the registration layout or installed package may differ.

4. Provide the MSI File to SQL Server Setup

  1. Return to the Windows Installer dialog.
  2. Click Browse.
  3. Select the verified cached MSI package if it is available and accepted by Windows Installer.
  4. Click OK and allow the installer to continue.
  5. Return to SQL Server Setup and check whether the upgrade progresses.

Important: Cached packages may have generated filenames. Do not rename or replace cached installer files without verifying the package identity and installer requirements. A cached MSI may not be accepted as a replacement source in every repair scenario.

5. Alternative Resolution: Download the Matching ODBC Driver

If the cached package is missing or rejected, obtain a compatible installer from Microsoft's official documentation:

Download Microsoft ODBC Driver for SQL Server

Before repairing or reinstalling, verify the installed driver version, Windows architecture, required installer package, and application dependencies.

Do not uninstall the existing driver as your first troubleshooting step. Other applications may depend on it, and removing it can introduce additional issues.

6. Validate the Driver Installation

After resolving the installer prompt, run the following PowerShell command to verify the registered driver version:

$paths = @(
    "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
    "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)

Get-ItemProperty $paths -ErrorAction SilentlyContinue |
    Where-Object {
        $_.DisplayName -match "ODBC Driver \d+ for SQL Server"
    } |
    Select-Object DisplayName, DisplayVersion

You can also inspect registered ODBC drivers:

Get-OdbcDriver |
    Where-Object { $_.Name -like "*SQL Server*" } |
    Select-Object Name, Platform, Attribute

Resume or rerun SQL Server Setup as appropriate. Review the setup summary and logs for any remaining failures.

SQL Server Setup logs are typically located under:

C:\Program Files\Microsoft SQL Server\<version>\Setup Bootstrap\Log\

The exact directory depends on the SQL Server version and installation configuration.

7. Troubleshooting Summary

Symptom Recommended Action
Setup requests msodbcsql.msi Identify the installed ODBC driver version.
Original installation source is unavailable Check the Windows Installer cache and product registration.
Cached MSI cannot be identified Inspect the LocalPackage property in installer registration.
Cached package is missing or rejected Obtain a compatible installer from Microsoft.
Upgrade still fails Review SQL Server Setup logs for the next reported failure.

Conclusion

The msodbcsql.msi prompt during a SQL Server in-place upgrade does not necessarily mean that Microsoft ODBC Driver 17 is missing. Windows Installer may simply be unable to locate the original installation source.

The recommended troubleshooting sequence is to identify the installed driver, inspect installer registration, locate and verify the cached MSI, and use a compatible Microsoft installer if necessary.

Best practice: Before upgrading a production SQL Server instance, verify prerequisites, preserve required installation media, take appropriate backups, and ensure a tested recovery plan is available.

Disclaimer: Test the resolution in a non-production environment before applying it to production.

No comments:

Post a Comment