Share via

Test connection failed because of an error in initializing provider. The given key was not present in the dictionary.

SB 5 Reputation points
2026-06-05T12:17:08.24+00:00

I am getting this error VS2022 and VS2026 when tried to create a connection from ssis project with connection manager. SQL server version is Microsoft SQL Server 2022 (RTM-GDR) (KB5073031) - 16.0.1165.1 (X64) Nov 24 2025 19:08:45.

It was working well with the previous version of SQL server. I have tried all options like Trust Server certificate, encryption false etc. Tried with Oledb driver for sql server 19, 18 etc

thanks

Suresh.

SQL Server Integration Services

2 answers

Sort by: Most helpful
  1. Deepesh Dhake 85 Reputation points
    2026-06-05T12:37:17.6866667+00:00

    This error is a client-side provider mismatch, not your SQL Server or your TLS settings. "The given key was not present in the dictionary" is the SSIS designer failing to load a provider, which is why changing Encrypt/TrustServerCertificate did nothing .

    You can try:

    Uninstall every "Microsoft OLE DB Driver for SQL Server" entry in Programs and Features (18 and 19), then install a single current MSOLEDBSQL 19, making sure you get both the x64 and x86 builds of the same version. The designer runs as x86, so the x86 build must be present and must match the x64 one.

    If this doesn't fix then if you can provide detailed error message then that will be great.

    Was this answer helpful?


  2. AI answer

    2026-06-05T12:17:23.96+00:00

    The error "Test connection failed because of an error in initializing provider. The given key was not present in the dictionary" when testing an SSIS OLE DB connection is a known issue in SQL Server 2016 SSIS after certain CUs, and is fixed by installing specific cumulative updates.

    From the available information, the documented fix is:

    1. Install the cumulative update that contains the fix for this error.
      • For SQL Server 2016, the fix is in:
        • Cumulative Update 6 for SQL Server 2016 SP2, or
        • Cumulative Update 14 for SQL Server 2016 SP1.
    2. After applying the appropriate CU, retry the Preview/Test Connection in the CDC Source / OLE DB connection manager.

    The context does not provide a corresponding KB for SQL Server 2022, but the pattern is that this specific dictionary-key error in SSIS design-time components is resolved by applying the CU that contains the fix.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.