Reply To: HVR exposes ORA-01406: fetched column value was truncated – what is the problem?

#8845
Frank Knot
Participant

Most likely this is not a problem or bug in HVR, but rather a data corruption in the database. The best course of action on an issue like this is to try reproduce the problem in another tool such as sqlplus to show that HVR does not cause the problem. Unfortunately this is not always possible or easy.

Recently we ran into this problem during a refresh and sqlplus did not expose the issue. The issue was also not reproducible on a row-by-row basis and it turned out to be related to the pre-fetching HVR performs through the Oracle OCI interface. Of course any other tool doing the same would have run into the same problem, but obviously sqlplus was not a tool like that.

In this case there turned out to be numeric values corrupted in the database where length(rawtohex()) > 42. Interestingly in sqlplus these columns showed up with no value. The workaround in this case (for the Refresh and Compare to work properly) was to use a capture expression on the location group SOURCE to perform

utl_raw.cast_to_number(hextoraw(substr(rawtohex(DISCOUNT_PER),1,42))).

© 2020 HVR

Test drive Contact us