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

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8843
    Frank Knot
    Participant

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

    (this is on Oracle of course)

    Note that this problem is more likely to be exposed in Refresh or Compare than during CDC.

    #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))).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Test drive
Contact us