Sunday, November 10, 2013

Realtime Scenario 3:ORA-01401: inserted value too large for column(Abinitio)

Real Scenario 3:
There were more records rejected than the maximum allowed.
The maximum number of rejects allowed is 50.
If you wish to allow more rejects then increase the num_errors parameter.


== SQL*Loader Log =================================
ORA-01401: inserted value too large for column
Record 130098: Rejected - Error on table XYZ.EXAMPLE, column "NAME_USER".
ORA-01401: inserted value too large for column


Solutions:

We can solve this issue in the below ways:

****Temporary fix***************(Abinitio)
we can allow the number of rejects more then 50 may be upto your choice(if you have 100 record which are causing issue then select 100).
so that all the records whcih are rejecting will be skipped and job will be completed succesfully.

******Permenant fix*************

1->we have to identify the number of records which are rejected.
2-> we need to check the length of the field (NAME_USER) in the rejected records. it shpould be greater then the column defined value.
      Ex: if Column USER_NAME is defined as below
                    
                      USER_NAME VARCHAR2(10);

     But the Value of USER_NAME in the rejected records are greater than 10.due to this the records are rejected while Loading into table EXAMPLE.
     we can check the length of USER_NAME for all rejected record as below.
     if Suppose we are Sourcing the Data from SOURCE_EXAMPLE table and Loading it into EXAMPLE Table.
      
     select LENGTH(USER_NAME),USER_ID from XYZ.SOURCE_EXAMPLE where LENGTH(USER_NAME)>10;
    
     This above Query will give all the record which are Having length >10.

3-> we need to Correct the field Size to allow the Records into the table EXAMPLE. if the data is valid.
4-> if the data in the field USER_NAME is not valid then we need to correct the Data iin the Source end. then please run the Failed job.
Thanks,
Anilkumar.

No comments:

Post a Comment