Duplicate objects in SSIS (ErrorCode Column)

In SSIS (multiple versions) you can get a seemingly random error when trying to create an OLEDB Source Component.

Full Error:
The package contains two objects with the duplicate name of “OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]” and “OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]”
The error is caused by a dumb, but in hindsight sort of obvious, problem.  The source query I was using is below.
  FROM [CurrentSurveyStatus] s
The problem is that my source query had a column explicitly named ErrorCode – which happens to be the name of one of the default built in columns that are piped to the component error output.  The same would be true if I had a column in my source query called “ErrorColumn”.  It’s not readily apparent that these output columns exist because they only would show up if you use the component error path, or if you look at the Advanced Editor as shown below.

SSIS won’t let you remove the default SSIS ErrorCode column from above, but it will let you rename it in the Advanced Editor.
So you have two options –
  • Rename your column
  • Rename the default SSIS column
Below I renamed the default column as you can see in the Meta Data Viewer, and the component no longer has errors.
Note: The warning is just that no rows would currently be sent to the error output in this example.

Leave a Reply

Your email address will not be published. Required fields are marked *