This discussion is archived
4 Replies Latest reply: Sep 25, 2013 12:57 PM by KnightOfBlueArmor RSS

Deleting Schemas:  What am I missing?

user12136582 Newbie
Currently Being Moderated

Hi.

 

I am on 11.2.0.3.0 - 64bit Production.

 

I have deleted a schema using DBMS_XMLSCHEMA.DELETESSCHEMA and delete_option 3.

 

I have then also deleted the resource using DBMS_XDB.DELETERESOURCE.

 

I then execute the XMLTYPE schemaValidate method on a record that was based on the schema just deleted and the result is an error that could only occur if the schema as still there (being more than one occurrence of an element that must have only one occurrence).

 

What am I missing?

 

 

 

 

Context:  This is a development database and I am trying to replace an incorrect schema without having to spend a lot of time (slow performing system) migrating data using that schema.

  • 1. Re: Deleting Schemas:  What am I missing?
    odie_63 Guru
    Currently Being Moderated

    Could you provide a test case so that we can reproduce without too much guessing ?

  • 2. Re: Deleting Schemas:  What am I missing?
    user12136582 Newbie
    Currently Being Moderated

    I will have to get back to you on that one.  I have a deadline to deploy a change by.  I have worked out a kludge to get it in for the moment.  I will try to get a test case up in the next 48 hours.

  • 3. Re: Deleting Schemas:  What am I missing?
    user12136582 Newbie
    Currently Being Moderated

    OK.  I have formulated a hypothesis while trying to get together a test case for this forum and Oracle support.

     

    Originally I replaced the XSD only as a resource using the DBMS_XDB.DELETERESOURCE method.  Life went on and eventually testing hit an error that lead me to believe I should have done something more.

     

    I then discovered the DBMS_XMLSCHEMA.DELETESSCHEMA method and tried to use that in conjunction with the DBMS_XDB.DELETERESOURCE method.  It was after this, when I could see the schema said one thing but the XMLTYPE schemaValidate method said something different, that I started this discussion and raised an Oracle Support call.

     

    Since then, I have been restoring the DB and repeating tests in order to produce a test case, but everything has then been working as expected.

     

    Hypothesis:  Removing the XSD originally using only the DBMS_XDB.DELETERESOURCE method left the system in some sort of inconsistent state that the subsequent use of the DBMS_XMLSCHEMA.DELETESSCHEMA method could not correct.

     

    Thanks to anyone who spent some time giving this some consideration.

  • 4. Re: Deleting Schemas:  What am I missing?
    KnightOfBlueArmor Newbie
    Currently Being Moderated

    The same thing happened to me....

Legend

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