Fixing Microsoft OLE DB Driver Installation Error in SQL Server 2019
Problem Overview
When attempting to install Microsoft SQL Server 2019 (Express, Developer, or Standard editions), users may encounter the following error:
"An installation package for the product Microsoft OLE DB Driver for SQL Server cannot be found. Try installing again using a valid copy of the installation package 'msoledbsql.msi'"
This error typically occurs when there are conflicts with existing OLE DB or ODBC drivers on the system, or when prerequisite components like the Visual C++ Redistributable are missing or corrupted.
Solution 1: Uninstall Existing OLE DB/ODBC Drivers (Recommended)
The most common solution is to remove existing Microsoft OLE DB and ODBC drivers before installing SQL Server 2019.
Step-by-Step Process
Open Programs and Features
- Press
Windows Key + R
, typeappwiz.cpl
, and press Enter - Alternatively, navigate through Control Panel → Programs → Programs and Features
- Press
Uninstall Existing Components
- Look for and uninstall any existing:
- "Microsoft OLE DB Driver for SQL Server"
- "Microsoft ODBC Driver for SQL Server" (any versions)
- Any other related SQL Server connectivity components
- Look for and uninstall any existing:
Restart the Installation
- Run the SQL Server 2019 installer again
- The setup should now successfully install the required OLE DB driver
WARNING
Make sure to only remove the OLE DB and ODBC drivers, not the full SQL Server installations if you have existing instances you want to preserve.
Solution 2: Install Visual C++ Redistributable
If the first solution doesn't work, you may need to install or repair the Visual C++ Redistributable packages:
Download both versions of the Visual C++ Redistributable:
Install both packages and restart your computer if prompted
Attempt the SQL Server installation again
INFO
The OLE DB Driver requires specific versions of the Visual C++ Redistributable. Installing both 32-bit and 64-bit versions ensures compatibility with all components.
Solution 3: Complete Cleanup and Reinstall
For persistent issues, perform a thorough cleanup:
- Uninstall all OLE DB and ODBC drivers (as in Solution 1)
- Use Microsoft's SQL Server Uninstall Tool to remove any residual components
- Download a fresh copy of SQL Server 2019 from the official Microsoft website
- Restart your computer and attempt installation again
Prevention Tips
To avoid this issue in the future:
- Always check for existing OLE DB/ODBC drivers before installing SQL Server
- Keep your Visual C++ Redistributable packages updated
- Download SQL Server installation media only from official Microsoft sources
- Consider using the SQL Server Installation Center's "System Configuration Checker" before proceeding with installation
Verification
After successful installation, verify that:
- SQL Server 2019 is installed and running
- The correct version of "Microsoft OLE DB Driver for SQL Server" appears in Programs and Features
- You can connect to your SQL Server instance using SQL Server Management Studio or other tools
If you continue to experience issues, consult the SQL Server Setup Logs for detailed error information.