Share via

"'MSOLEDBSQL19' provider is not registered", but it is, and runs fine for weeks

David Weigel 0 Reputation points
2026-02-17T13:44:33.5+00:00

We have a web application that runs with a connection string of

Provider=MSOLEDBSQL19;uid=:U;pwd=:P;server=theserver;initial catalog=thedatabase;MultipleActiveResultSets=True;Use Encryption for Data=Optional;MARS Connection=True;

The application will run fine for weeks and suddenly will start throwing "The 'MSOLEDBSQL19' provider is not registered on the local machine." at System.Data.OleDb.OleDbConnection.Open().

Obviously it's registered so the message is misleading. Once the error starts happening it will happen for everyone. I quickly swapped in "sqloledb.1" for "MSOLEDBSQL19" and refreshed the app pool and got it working, but I know that "sqloledb.1" is deprecated.

Any suggestions? Is IIS running out of connections? Is it because there's a 32-bit driver also installed and it's getting confused?

Windows Server 2019 Datacenter (OS Build 17763.8389) on Azure, IIS 10.0.17763.1, app pool has all defaults except .NET CLR Version is v4.0 and Load User Profile is false. Installed driver is 2019.0192.0000.00

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-17T13:44:49.4433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message "The 'MSOLEDBSQL19' provider is not registered on the local machine" can be misleading, especially if the provider has been functioning correctly for an extended period. Here are some suggestions to troubleshoot and resolve the issue:

    1. Check for Driver Conflicts: Since you mentioned that both 32-bit and 64-bit drivers might be installed, ensure that your application pool in IIS is configured to use the correct bitness that matches the installed driver. If your application is running in a 64-bit mode, ensure that the 64-bit version of the MSOLEDBSQL driver is installed and being used.
    2. Connection Limits: Investigate whether IIS is running out of available connections. You can monitor the number of active connections and the connection pool settings to see if they are being exhausted.
    3. Driver Reinstallation: Sometimes, reinstalling the driver can resolve registration issues. Ensure that you have the latest version of the Microsoft OLE DB Driver for SQL Server installed.
    4. Event Logs: Check the Windows Event Viewer for any related error messages that might provide additional context on why the provider is failing.
    5. Application Pool Recycling: If the application pool is recycling frequently, it might lead to temporary issues with the driver registration. Consider adjusting the recycling settings to see if that helps.
    6. Update the Connection String: If you continue to face issues, consider using the sqloledb provider as a temporary workaround, but plan to transition back to MSOLEDBSQL19 once the underlying issue is resolved.

    By following these steps, you should be able to identify the root cause of the issue and restore functionality without relying on the deprecated provider.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.