This discussion is archived
9 Replies Latest reply: Jul 8, 2010 10:22 AM by mdrake RSS

Register Schema: ORA-20001: enable_hierarchy_internal

anecker Newbie
Currently Being Moderated
Hi,
I'm trying to register an XML Schema and get the following errors:
-----
16:45:28 SQL> BEGIN
16:45:28 2      DBMS_XMLSCHEMA.registerSchema(
16:45:28 3      SCHEMAURL     => 'http://www.sample.net/phoenix/xsd/data_exchange.xsd',
16:45:28 4      SCHEMADOC     => XDBURIType('/phoenix/DataSupplier20080528-2.xsd').getCLOB(),
16:45:28 5      GENTABLES     => TRUE
16:45:28 6      );
16:45:28 7      COMMIT;
16:45:28 8 END;
16:45:28 9 /
BEGIN
*
ERROR at line 1:
ORA-20001: enable_hierarchy_internal
ORA-06512: at "XDB.DBMS_XDBZ", line 28
ORA-06512: at line 1
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 2
18:13:31 SQL>
-----

Database Version: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 (Linux)

In my previous attempts I've seen that the types and tables will be created and removed after the error occurred...
Does anybody know what the problem is?

TIA
Andreas
  • 1. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    mdrake Expert
    Currently Being Moderated
    Can you provide the XML schema, it looks like an internal error is being raised and swallowed by the system. Also, can you open a tar with Oralce Support for this issue and post the tar number here.

    Edited by: mdrake on Dec 5, 2008 12:42 PM
  • 2. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    anecker Newbie
    Currently Being Moderated
    Is it possible to attach the XSD file to this thread? (Size is approx. 500KB)
    Since we are validating the functionalities of XMLDB at the moment, I don't have an appropriate CSI to open a TAR.
    Regards
    Andreas
  • 3. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    If you were able, or at least someone on your workplace, to provide you a 11.1.0.7.0 database, then this probably also means that someone in your office should be able to get hold on a CSI, because otherwise you weren't able to upgrade the database...
  • 4. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    anecker Newbie
    Currently Being Moderated
    There are different types of CSIs, some can access patches but can't open service requests.
    Is it possible to upload the xsd file or send it by e-mail?
  • 5. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    You can try to post it here, You can try to put it online via an webserver, You can put it online via a file share service
  • 6. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    mdrake Expert
    Currently Being Moderated
    I've recently seen two cases where this will occur

    1. Registering a Schema as SYS.

    This is not supported, please don't do it.

    2. Registering an XML Schema with insufficinet provlidges. Privlildges required are as follows

    grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
    /

    Hiope this helps...

    -Mark
  • 7. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    If I am not mistaken then I encountered issue 1. But then again, if you are (me in this case) sloppy and or are doing it via a quick & dirty way, then of course you will get what you deserve...

    ;-)


    Mark,

    could you have a look at Re: XMLfile can not insert into XMLType table I think this is an interesting one. At least for me this is an new ORA message content (apparently ORA-31020 can have a lot of different messages...). Would be interested what mechanism is causing the error.
  • 8. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    user10763276 Newbie
    Currently Being Moderated
    Hi Mr.Mdrake,

    I am working on XML Type Views, and I did created an XML Type view and it did worked well. Later on there is a change of envirnoment for the development team. So, I tried to deploy my XML Type View scripts in the new environment. While registering the Schema(locally) to the repository I encountered the fallowing error

    Error report:
    ORA-20001: enable_hierarchy_internal
    ORA-06512: at "XDB.DBMS_XDBZ", line 28
    ORA-06512: at line 1
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 2


    I have gone through your threads realted to this kind of error and verified wethere I have previleges or not ? Well, there seems to be no problem regarding that(looks like I have all the previlages).
    And one more question I would like to ask is do I have to register the schema globally or locally? The script that worked for me in the previous environment I did register the schema globally using the default.

    Here, even if I try to register the schema locally or globally I am facing the error. The error i am getting while i resiter the schema globally is

    Error report:
    ORA-31086: insufficient privileges to register schema "http://www.oracle.com/MBR_TYPE.xsd"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 2
    31086. 00000 - "insufficient privileges to register schema \"%s\""
    *Cause:    An attempt was made to register a schema without
    sufficient privileges.
    *Action:   Make sure that the user has sufficient privileges to register
    the schema.

    The suggestion that you have

    "1. Registering a Schema as SYS.

    This is not supported, please don't do it." is that mean schema should be registered globally??

    Pardon my ignorance if I say anything which is meaning less.

    Thanks in advance
  • 9. Re: Register Schema: ORA-20001: enable_hierarchy_internal
    mdrake Expert
    Currently Being Moderated
    Locally or Globally depends on the use case.

    If only the owner of the XML schema (Database Schema) need to use the schema or XMLType based on the XML Schema then the schema should be registered locally. If other database schemas (users) will need access to the XML Schema then it must be registered Globally. In order to register an XML Schema the person registering must have XDBADMIN. Schemas should never be registered in the SYS SCHEMA. User SYS can be used to registered a schema, but should always provide an OWNER parameter to registered schema, indicating who the OWNER of the registerd XML schema is. OWNER should never be SYS.

    Beyond that you must have create table, alter session, create trigger etc to register an XML schema.

    -M

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points