SSIS job failed - An item with the same key has already been added

10,032

I found the error and solution 😊

It seems I deployed a package with 2 same named SMTP connection (one as a project connection and the other with same name as a package connection) I deleted the unnecessary (in my case deleted the package one) and deployed the fixed package. Now the job run successfully calling on one only connection.

  1. I was missing the correct error handling from the error itself since it did not direct me to the specific connection
  2. The package failed at runtime on validations – so no error logs to assist
  3. I run the query from [SSISDB].[catalog].[execution_parameter_values] and compared between a successful run to a failed then I noticed the same named connections

Thank you for your comments!

Yoni

Share:
10,032

Related videos on Youtube

Yoni
Author by

Yoni

Updated on June 04, 2022

Comments

  • Yoni
    Yoni 7 months

    Our SSIS package fails 2 seconds into the run with the following error:

    An item with the same key has already been added.; at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.SqlServer.IntegrationServices.Server.ISServerExec.ProjectOperator.StartPackage() at Microsoft.SqlServer.IntegrationServices.Server.ISServerExec.ProjectOperator.PerformOperation() Transact-SQL stored procedure

    We deploy our SSIS packages (2016) to our SSISDB on MSSQL: 13.0.4001.0, we also have environment variables in that same folder

    The strange thing is that in this project I have 5 packages that run ok (different job) but only 1 fails (it has its’ own job)

    1. I already deleted a recreated the folder/ environment variables/jobs - same result
    2. I made sure I have Different environment variables folder name
    3. We run the job with different users and 2 of them were admins in the DB
    4. We have other servers which have the same config and project (2 QA environments) and they work the same but OK!

    Do I need to go directly to MSDB and delete a row? Where?

    Appreciate any ideas – thank you all


    I found the error and solution 😊

    It seems I deployed a package with 2 same named SMTP connection (one as a project connection and the other with same name as a package connection) I deleted the unnecessary (in my case deleted the package one) and deployed the fixed package. Now the job run successfully calling on one only connection.

    1. I was missing the correct error handling from the error itself since it did not direct me to the specific connection
    2. The package failed at runtime on validations – so no error logs to assist
    3. I run the query from [SSISDB].[catalog].[execution_parameter_values] and compared between a successful run to a failed then I noticed the same named connections

    Thank you for your comments!

    Yoni

Related