Wednesday, August 1, 2012

SSIS Error - The value violated the integrity constraints for the column

The error, as you can see below, doesn't say much about what is wrong, it is pretty generic and vague.

[OLE DB Destination [469]] Error: There was an error with input column "ColumnName" (578) on input "OLE DB Destination Input" (482). The column status returned was: "The value violated the integrity constraints for the column.".

The reason(most likely) the SSIS package failed is because(atleast) one of the columns in your data source has NULL values and the corresponding column(s) in the destination is set to not allow NULL values. You can fix this by either modifying the destination table to allow NULL values or by setting up a default value for the source column that has NULL values.