Ora-6502 Hex To Raw Conversion Error - Backout Event Switch to disable the fix for 200446 not effective (Doc ID 1267589.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 9.2.0.8 to 11.2.0.2 - Release: 9.2 to 11.2
Information in this document applies to any platform.

Symptoms

After upgrading the Database from 8.0.6, 8i or 9.0 to 9.2 or above,  ORA-6502 ' PL/SQL:
numeric or value error: hex to raw conversion error' may occur for some PL/SQL
blocks when conversions from raw to long, or vice versa, are performed.
These errors continue to occur even when event 10943, level 1048576 is set,
in an attempt to disable the fix for <bug 2004646>, e.g


alter session set events '10943 trace name context forever, level 1048576';

declare
x long := 'hello world';
y raw(40) := x;
begin
dbms_output.put_line(utl_raw.cast_to_varchar2(y));
end;

ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
ORA-06512: at line 3

Changes

Database upgraded from 8.0.6, 8i or 9.0 to 9.2 or above.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms