Upgrade of XDB from 11.2 to 12.1 Fails with ORA-30944, ORA-22881 (Doc ID 2071358.1)

Last updated on FEBRUARY 08, 2017

Applies to:

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

Symptoms

All the components in 11g are valid and there are no invalid objects.

In upgraded 12c, XDB component is invalid and 12c database is missing the type XDB.XDB_LINK_TYPE

Upgrade log reports following error.

SQL> --evlove the schema and remove servlet element
SQL> declare
  2       newsch   XMLSequenceType;
  3       urls     XDB$STRING_LIST_T;
  4       schowner XDB$STRING_LIST_T;
  5       sch      VARCHAR2(4000) :=
  6  '<schema xmlns="http://www.w3.org/2001/XMLSchema"
  7          targetNamespace="http://xmlns.oracle.com/xdb/XDBStandard"
  8          xmlns:xdb="http://xmlns.oracle.com/xdb"
  9          version="1.0" elementFormDefault="qualified">
 10  
 11    <element name = "LINK" xdb:SQLType="XDB_LINK_TYPE" xdb:SQLSchema="XDB" xdb:defaultTable="">
 12     <complexType>
 13      <sequence>
 14       <element name="ParentName">
 15         <simpleType>
 16           <restriction base = "string">
 17             <length value = "256"/>
 18           </restriction>
 19         </simpleType>
 20       </element>
 21       <element name="ChildName">
 22         <simpleType>
 23           <restriction base = "string">
 24             <length value = "1024"/>
 25           </restriction>
 26         </simpleType>
 27       </element>
 28       <element name= "Name">
 29         <simpleType>
 30           <restriction base = "string">
 31             <length value = "256"/>
 32           </restriction>
 33         </simpleType>
 34       </element>
 35       <element name= "Flags">
 36         <simpleType>
 37           <restriction base = "base64Binary">
 38             <length value = "4"/>
 39           </restriction>
 40         </simpleType>
 41       </element>
 42       <element name="ParentOid">
 43         <simpleType>
 44           <restriction base = "base64Binary">
 45             <length value = "16"/>
 46           </restriction>
 47         </simpleType>
 48       </element>
 49       <element name="ChildOid">
 50         <simpleType>
 51           <restriction base = "base64Binary">
 52             <length value = "16"/>
 53           </restriction>
 54         </simpleType>
 55      </element>
 56      <element name="LinkType">
 57        <simpleType>
 58          <restriction base="string">
 59            <enumeration value="Hard"/>
 60            <enumeration value="Weak"/>
 61            <enumeration value="Symbolic"/>
 62          </restriction>
 63        </simpleType>
 64      </element>
 65      </sequence>
 66     </complexType>
 67    </element>
 68  
 69  </schema>';
 70  
 71  begin
 72       urls := XDB$STRING_LIST_T('http://xmlns.oracle.com/xdb/XDBStandard.xsd');
 73       newsch := XMLSequenceType(xmltype(sch)) ;
 74       schowner  := XDB$STRING_LIST_T('XDB');
 75       dbms_xmlschema.CopyEvolve(urls, newsch, NULL, FALSE, NULL,TRUE,
 76         FALSE, schowner);
 77  end;
 78  /
declare
*
ERROR at line 1:
ORA-30944: Error during rollback for XML schema
'http://xmlns.oracle.com/xdb/XDBStandard.xsd' table <n/a> column ''
ORA-22881: dangling REF
ORA-06512: at line 1
ORA-30942: XML Schema Evolution error for schema
'http://xmlns.oracle.com/xdb/XDBStandard.xsd' table <n/a> column ''
ORA-22881: dangling REF
ORA-06512: at line 1
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 153
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 221
ORA-06512: at line 75

 

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