My Oracle Support Banner

Upgrade to 12.2 or later, Fails with Error:"ORA-01722: Invalid number : NONUPGRADED_TABLEDATA" (Doc ID 2279497.1)

Last updated on AUGUST 07, 2023

Applies to:

Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Upgrading the database to  12.2 or later .
The upgrade errors with the following message :

06:27:25 DOC>#######################################################################
06:27:25 DOC>
06:27:25 DOC>      The following statement will cause an "ORA-01722: invalid number"
06:27:25 DOC>      error, if the database contains invalid data as a result of type
06:27:25 DOC>      evolution which was performed without the data being converted.
..
..
06:27:25 DOC>      Data in columns of tables dependent on Oracle_maintained types
06:27:25 DOC>      must be converted before the database can be upgraded.
..
..
06:27:25 DOC>      Load the Pre-upgrade Information Tool into the database using the
06:27:25 DOC>      original database server (see the Pre-Upgrade Information Tool
06:27:25 DOC>      instructions in the Oracle Database Upgrade Guide). Then execute
06:27:25 DOC>      the following commands to perform the data conversion for
06:27:25 DOC>      Oracle-Maintained tables:
06:27:25 DOC>
06:27:25 DOC>      SET SERVEROUTPUT ON
06:27:25 DOC>      DECLARE
06:27:25 DOC>       RESULT BOOLEAN;
06:27:25 DOC>      BEGIN
06:27:25 DOC>       RESULT:= DBMS_PREUP.RUN_FIXUP('invalid_sys_tabledata');
06:27:25 DOC>      END;
06:27:25 DOC>      /
06:27:25 DOC>      SET SERVEROUTPUT OFF
..
..
06:27:25 DOC>      You should then confirm that any user tables dependent on Oracle-
06:27:25 DOC>      Maintained types are also converted.    You should review the data and
06:27:25 DOC>      determine if it needs to be converted or removed.
..
..
06:27:25 DOC>      Once the data is confirmed, the following commands will convert the
06:27:25 DOC>      the data returned by the above query:
06:27:25 DOC>
06:27:25 DOC>      SET SERVEROUTPUT ON
06:27:25 DOC>      DECLARE
06:27:25 DOC>       RESULT BOOLEAN;
06:27:25 DOC>      BEGIN
06:27:25 DOC>       RESULT:= DBMS_PREUP.RUN_FIXUP('invalid_usr_tabledata');
06:27:25 DOC>      END;
06:27:25 DOC>      /
06:27:25 DOC>      SET SERVEROUTPUT OFF
06:27:25 DOC>
..
..
06:27:25 DOC>      Depending on the amount of data involved, converting the evolved type
06:27:25 DOC>      data can take a significant amount of time.
06:27:25 DOC>
06:27:25 DOC>#######################################################################
06:27:25 DOC>#######################################################################
06:27:25 DOC>#
06:27:25 SQL>
06:27:25 SQL> WITH DEPOBJ AS
06:27:25   2      (SELECT DO.OBJ#, D.D_OBJ#,D.P_OBJ#  FROM SYS.DEPENDENCY$ D, SYS.OBJ$ DO
06:27:25   3       WHERE DO.OBJ# = D.D_OBJ#
06:27:25   4       AND DO.TYPE# IN (2,13)
06:27:25   5      )
06:27:25   6  SELECT TO_NUMBER('NONUPGRADED_TABLEDATA') FROM SYS.V$INSTANCE
06:27:25   7  WHERE
06:27:25   8         (version <> (select version from sys.registry$ where cid = 'CATALOG'))
06:27:25   9         AND
06:27:25  10         EXISTS
06:27:25  11         (SELECT o.obj#
06:27:25  12          FROM SYS.OBJ$ o, SYS.COL$ c, SYS.COLTYPE$ t
06:27:25  13          WHERE o.OBJ# = t.OBJ# AND c.OBJ# = t.OBJ# AND c.COL# = t.COL#
06:27:25  14            AND t.INTCOL# = c.INTCOL# AND BITAND(t.FLAGS, 256) = 256
06:27:25  15            AND o.TYPE# = 2 AND o.OBJ# IN
06:27:25  16           (SELECT d.obj#
06:27:25  17            FROM DEPOBJ d
06:27:25  18            START WITH d.p_obj# IN
06:27:25  19              (SELECT obj# from sys.obj$
06:27:25  20               WHERE type#=13
06:27:25  21                 AND owner# IN
06:27:25  22                (SELECT schema# FROM sys.registry$ WHERE namespace='SERVER'
06:27:25  23                 UNION
06:27:25  24                 SELECT schema# FROM sys.registry$schemas
06:27:25  25                 WHERE namespace='SERVER'
06:27:25  26                 UNION
06:27:25  27                 SELECT user# FROM sys.user$ WHERE type#=1
06:27:25  28                    AND bitand(spare1,256)=256))
06:27:25  29            CONNECT BY NOCYCLE PRIOR d.d_obj# = d.p_obj#));
SELECT TO_NUMBER('NONUPGRADED_TABLEDATA') FROM SYS.V$INSTANCE
                 *
ERROR at line 6:
ORA-01722: invalid number

 

Receiving following in upgrade log :

Unexpected error encountered in catctlMain; Error Stack Below; exiting
Died at /ORCL/rdbms/admin/catctl.pl line 8976.
at /ORCL/rdbms/admin/catctl.pl line 8976.
main::catctlDie("\x{a}Unexpected error encountered in catconExec; exiting\x{a} 2") called at
ORCL/rdbms/admin/catctl.pl line 5481
main::catctlExecutePhaseFiles(0, 1, undef, undef, undef) called at /ORCL/rdbms/admin/catctl.pl line 1979
main::catctlRunPhase(0, 1, undef, undef, undef) called at /ORCL/rdbms/admin/catctl.pl line 2123
main::catctlRunPhases(0, 109, 109, undef, undef, undef) called at /ORCL/rdbms/admin/catctl.pl line 2739
main::catctlRunMainPhases() called at /ORCL/rdbms/admin/catctl.pl line 1405
main::catctlMain() called at /ORCL/rdbms/admin/catctl.pl line 1314
eval {...} called at /ORCL/rdbms/admin/catctl.pl line 1312

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.