1 Reply Latest reply: May 16, 2013 11:31 AM by 1009366 RSS

    Failed to generate SQL statements for DatabaseConvertorModel (ORA-06502)

      After successful preparations I finally started "Convert Database" on Oracle
      However, after a few seconds the process stopped with this error message:

      "Failed to generate SQL statements for DatabaseConvertorModel."

      In the log file I see the following details referencing to exception code 6502 and ORA-06502 in SYS.DBMS_METADATA (which is wrapped Oracle code):

      16.15:20:31:312;P458;F;09999 SQL text is SELECT
      'ALTER SESSION SET EDITION ="'|| (case when u.spare2 is null then 'ORA$BASE' else (SELECT eo.name FROM sys.obj$ eo WHERE eo.obj#=u.spare2 AND eo.type#=57) END)||'"' edition_SQL, o.obj#, o.type#, dbms_metadata.get_ddl('VIEW', o.name, u.name) SQL_TXT FROM sys.obj$ o, sys.user$ u, (select distinct x.obj# from sys.VIEW$ x where x.rowid in (select decode(substr(cast(e.row_id as varchar2(4000)),1,1),'*',null,e.row_id) from system.dum$exceptions e, sys.obj$ o, system.dum$tables dt where e.obj# = o.obj# AND (dt.convertible + dt.too_large + dt.over_limit + dt.invalid + NVL(dt.SCHEDULED_INVALID, 0)+ NVL(dt.SCHEDULED_OVER_LIMIT, 0)+NVL(dt.SCHEDULED_TOO_LARGE, 0)+NVL(dt.SCHEDULED_CONVERTIBLE, 0))>0 and dt.obj#=o.obj# and o.name = 'VIEW$' and o.owner# = 0 and o.type# = 2) ) ds WHERE o.type# = 4 and u.user# = o.owner# and o.obj# = ds.obj#;
      Connection ID is 0. Connection session ID is 16, serial number is 9055.
      Exception error code is 6502.
      Exception call stack is
      java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
      LPX-00216: invalid character 0 (0x0)
      ORA-06512: at "SYS.DBMS_METADATA", line 5088
      ORA-06512: at "SYS.DBMS_METADATA", line 7589

      What is wrong here?