CDRRate SQLException ORA-01438

Issue:

CDRs are not being rated. CDRs are being collected from OSPrey servers and inserted into the REACDR table and ReportableCDR table. Traffic reports are being created as expected, but there are no Billing Reports and no CDRs being rated and added to the RatedCDR table. The “ORA-01438” error message is reported by the CDRRate application.

Log Message:

2012-11-20 05:30:43|CDRRate |ERROR |SQLException: ORA-01438: value larger than specified precision allowed for this column

Troubleshoot:

The error message indicates that a data field being calculated by CDR_Rate is too large for a column defined in the RatedCDR table. This problem can be caused by very long call durations. When the long call duration is multiplied by its rate, the rated amount can be too large for the RatedCDR column, so the CDR is rejected and CDRs are not rated.

Solution:

Find CDRs with excessively long durations in the REACDR table. These CDRs either need to be moved from the REACDR table or the RatedDuration needs to be decreased manually.

A single CDR which causes an SQL Exception will block the rating process until the SQL Exception is resolved. A quick fix can be to change the Updatable flag for long duration CDRs from ‘Y’ to ‘L’. The CDRRate process will only rate CDRs that have Updatable = ‘Y’. Removing long CDRs from the rating process will allow CDRRate to rate short duration CDRs while the manual change to RatedDuration is made for CDRs with Updatable = ‘L’. Below is an SQL statement that will change Updatable to ‘L’ in the REACDR table that have RatedDuration longer than one week (604800 seconds).

update REACDR
set updatable = 'L'
where ratedduration > 604800 and updatable = 'Y';
commit;

When RatedDuration has been fixed for all CDRs with Updatable = ‘L’, use the following SQL statement to change updatable to ‘Y’ so the calls can be rated by the CDRRate process.

update REACDR
set updatable = 'Y'
where updatable = 'L';
commit;