I am trying to do a bulk insert of 10 million of rows from Oracle to SQL Server using BulkCopy.WriteToServer().

I have made sure 

* The table columns and data types on both sides are the same. I meant Oracle's Date data type maps to the Sql Server's datetime data type. Varchar2 maps to varchar, etc.
* No triggers and indexes on the destination table

When it came to just about 1.4 million rows it failed with System.ArgumentOutOfRangeException: Hour, Minute, and Second parameters describe an un-representable DateTime. at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)

Here is my code

```
      SqlBulkCopy copy;
      copy = new SqlBulkCopy(destConn, SqlBulkCopyOptions.TableLock, null); 
      // ColumnMappings property is used to map column positions, not data type
      copy.DestinationTableName = DestTable;
      copy.NotifyAfter = 5000; 
      copy.SqlRowsCopied += new SqlRowsCopiedEventHandler(OnSqlRowsCopied);
      copy.BulkCopyTimeout = 0;
      try { copy.WriteToServer((IDataReader)rd); }
      catch (Exception ex)
      {
        AppInfo.TableMsg[SrcTable] = AppInfo.TableMsg[SrcTable] + "\r\n" + "bulkcopy.WriteToServer(rd) failed. " + ex.Message;
        throw ex;
      }

```

My table got over 100 columns and there are 26 DATE columns. It's hard to sort out where the bad data is

So I got 3 questions here

1. Is there any setting/option to make WriteToServer() continue or ignore exception? Or any way I can do in catch block to make it continue? I don't care leaving the bad data behind. I am looking for a way to tell it to continue on insertion errors.
2. Is there any way to prevent this from happening? For example anything I can to in select query that fills the OracleDataReader?
3. If no solution to the above 2 questions, then is there any good way to cleanse the "bad date" out on Oracle side?

Thanks,

Update:
I have done the following 

1. Change destination table data type from datetime to datetime2
2. Modify the select list to 

CASE WHEN my\_date\_column < To\_Date('01/01/1753', 'mm/dd/yyyy') THEN To\_Date('01/01/1753','mm/dd/yyyy') ELSE my\_date\_column END

for all the columns with DATE datatype.

But the error still persists. Here is complete error message.

```
System.ArgumentOutOfRangeException was caught
  HResult=-2146233086
  Message=Hour, Minute, and Second parameters describe an un-representable DateTime.
  Source=mscorlib
  StackTrace:
       at System.DateTime.TimeToTicks(Int32 hour, Int32 minute, Int32 second)
       at Oracle.DataAccess.Client.OracleDataReader.GetDateTime(Int32 i)
       at Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
       at System.Data.SqlClient.SqlBulkCopy.GetValueFromSourceRow(Int32 destRowIndex, Boolean& isSqlType, Boolean& isDataFeed, Boolean& isNull)
       at System.Data.SqlClient.SqlBulkCopy.ReadWriteColumnValueAsync(Int32 col)
       at System.Data.SqlClient.SqlBulkCopy.CopyColumnsAsync(Int32 col, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.CopyRowsAsync(Int32 rowsSoFar, Int32 totalRows, CancellationToken cts, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsync(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
       at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
       at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
       at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)

```

From the error message it looks like the offending part is OracleDataReader rather than SqlBulkCopy.

How can I quickly spot these offending value using a Oracle query?
Any further suggestions?