Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I remove an XML Schema

r3bennettSep 12 2014 — edited Sep 12 2014

I'm running Oracle 11gR2 11.2.0.3 and I'm unable to remove some xml schema that I'd like to remove.

The error I'm receiving is:

ORA-31050: Access denied

ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 109

ORA-06512: at line 12

and the code I'm seeing this error in is:

declare

  cursor getSchemas

  is

  select SCHEMA_ID

        ,SCHEMA_URL

    from user_XML_SCHEMAS

   where schema_url like '%sibi_translation'

      or schema_url like '%sibi_translation.xsd';

begin

  for s in getSchemas() loop

    dbms_xmlschema.purgeschema(SCHEMA_ID => s.schema_id);

  end loop;

end;

/

The XML schema was originally created with the following:

EXEC DBMS_XMLSCHEMA.registerschema (schemaurl => 'http://ldsces.org/sibi_translation.xsd' ,schemadoc => BFILENAME ('SIBI_XML_DIR','sibi_translation.xsd'),LOCAL => TRUE,gentypes => TRUE,genbean => FALSE,gentables => TRUE,FORCE => TRUE,OWNER => 'SIBI',enablehierarchy => DBMS_XMLSCHEMA.enable_hierarchy_contents,options =>0);

and

EXEC DBMS_XMLSCHEMA.registerschema (schemaurl => 'http://ldsces.org/sibi_translation' ,schemadoc => BFILENAME ('SIBI_XML_DIR','sibi_translation.xsd'),LOCAL => TRUE,gentypes => TRUE,genbean => FALSE,gentables => TRUE,FORCE => TRUE,OWNER => 'SIBI',enablehierarchy => DBMS_XMLSCHEMA.enable_hierarchy_contents,options =>0);

Please advise.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2014
Added on Sep 12 2014
1 comment
1,288 views