Generic ODBC external data sources may not work after installing Cumulative Update


Symptoms

 

After you install SQL Server 2019 CU19 or SQL Server 2022 CU2, external data sources using generic ODBC connector may no longer work. When you try to query external tables that were created before installing the cumulative update, you receive the following error message:

 

Msg 7320, Level 16, State 110, Line 68

Cannot execute the query « Remote Query » against OLE DB provider « MSOLEDBSQL » for linked server « (null) ». Object reference not set to an instance of an object.

 

If you try to create a new external table, you receive the following error message:

 

Msg 110813, Level