Upgrade to 12.2.0.1 fails with Error :"ORA-02296: cannot enable (SYS.) - null values found" (Doc ID 2279577.1)

Last updated on JULY 03, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

On attempt to upgrade from 12.1.0.2 to 12.2.0.1 it is failing with below error:

17:30:50 SQL> Rem The column radm_mc$.pe# must now be altered to NOT NULL since
17:30:50 SQL> Rem it has been populated with the Policy Expression IDs.
17:30:50 SQL> Rem
17:30:50 SQL> alter table sys.radm_mc$ modify pe# NOT NULL
17:30:50 2 /
alter table sys.radm_mc$ modify pe# NOT NULL
*
ERROR en linea 1:
ORA-02296: cannot enable (SYS.) - null values found

17:30:50 SQL> DECLARE
17:30:50 2 previous_version varchar2(30);
17:30:50 3 compatible_version varchar2(30);
17:30:50 4 policy_description varchar2(30);
17:30:50 5 policy_expression_key number;
17:30:50 6 BEGIN
17:30:50 7 previous_version := '12.1.0.1.0';
17:30:50 8 compatible_version := '11.0.0.0.0';
17:30:50 9 policy_description := 'Default policy expression.';
17:30:50 10
......
17:30:50 25
17:30:50 26 EXECUTE IMMEDIATE
17:30:50 27 'INSERT INTO sys.radm_pe$'
17:30:50 28 || '(pe#, pe_obj#, pe_pexpr, pe_version, pe_descrip, pe_compat)'
17:30:50 29 || ' VALUES ('
17:30:50 30 || policy_expression_key
17:30:50 31 || ','
17:30:50 32 || cur_rec.object_number
.......
17:30:50 42
17:30:50 43 EXECUTE IMMEDIATE
17:30:50 44 'UPDATE sys.radm_mc$ SET pe# = ' || policy_expression_key ||
17:30:50 45 ' WHERE obj# = ' || cur_rec.object_number;
17:30:50 46 END;
17:30:50 47 END LOOP;
17:30:50 48 END;
17:30:50 49 /
DECLARE
*
ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.DBMS_ASSERT", line 427
ORA-06512: at "SYS.DBMS_ASSERT", line 511
ORA-06512: at line 26
ORA-06512: at line 26

 

 

Changes

 Upgrading the database to 12.2.0.1.

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