0 Replies Latest reply: Sep 8, 2012 7:37 PM by 726603 RSS

    OracleBulkCopy issue: Ora-01400: cannot insert NULL

    726603
      Hi,

      I'm using ODP.Net bulk copying, and suddenly have started getting this error while copying one table:

      MESSAGE: Bulk Copy failed for table Incident.INC. Database reported exception: Error in row '10001' column '11'
      ORA-01400: cannot insert NULL into (ID)

      ID is the primary ID column on this table, so obviously has no NULL data in the source database.
      I experienced the same issue with other columns on the same row, but updated them to allow NULL to try and figure out what's going on.
      OracleBulkCopy seems to think this entire row contains NULL data!

      Has anyone seen anything like this before? Any suggestions on what else I can do to debug this?

      I'm using 11gR2.

      [update: I worked around the issue temporarily by copying the rows from the table one at a time (not with bulk copy).  I'm seeing the same error now on
      another unrelated table, also reported to be on row '10001'.  If I had to guess, I'd say it might be some sort of buffer overflow issue in the odp.net bulk copy?
      But note that it's NOT happening on every table with more than 10000 rows.]

      Thanks,
      Ben

      Edited by: Benjamin Lewis on Sep 8, 2012 5:37 PM