Import data into blank table with Primary key fails. The same data is imported fine when Primary Key is deleted.
hi
I have importing 5 column table from dbf to sql. (id, date, time, jobib, empoyeeid).
I have a black table on sql table with 6 columns (+ primary key).
SSIS package fails ( data flow ==> ADO.NET == > Data Conversion ==<> OLE DB Destination) if blank table has primary key and
succeeds if table does not have primary key.
It fails on 9800 row count with messages below.
I assume primary key is created automatically on insert.
[OLE DB Destination [136]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'id', table 'JR_SSIS.dbo.tt_arch'; column does not allow nulls. INSERT
fails.".
January 24th, 2011 9:32am
It must be your data.
Your blank table's ID column is designed to not to accept NULL values.
Did you examine the row where it fails? (It must be around the 9800).
To remedy, usually we create a Derived Column Transformation to substitute this NULL to whatever makes sense if this can be accepted as a workaround.
E.g. numeric/int ID column, if the ID is null, we may override it with 0.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 10:04am