title: Registering XML Schemas in Oracle - how to get rid of leftover objects
body: <p>I tried to register a schema in Oracle the other day to validate an XML document. The code I used was fairly simple:</p>
  
  <pre><code>dbms_xmlschema.registerSchema(schemaURL =&gt; 'http://www.myCompany.com/schema',
                                schemaDoc =&gt; :schemaCLOB);
  </code></pre>
  
  <p>At first, everything seemed to work well, as far as validation goes. I noticed though, that there were dozens of new database objects: tables, triggers and types (a few dowsn tables and triggers, but probably many hundreds of types). 
  I tried to delete the schema like this:</p>
  
  <pre><code>dbms_xmlschema.deleteSchema(schemaURL =&gt; 'http://www.myCompany.ca/schema',
                              delete_option =&gt; dbms_xmlschema.DELETE_INVALIDATE);
  </code></pre>
  
  <p>That de-registered the schema, but all of the objects were left behind.</p>
  
  <p>I RTFM'd a little too late and discovered that the extra objects were created by leaving default values in the call to registerSchema, so I realized I would have to manually remove the extra objects.</p>
  
  <p>Now when I try to remove the objects, Oracle tells me they don't exist. I can't select from them and my IDE (PL/SQL Developer) shows them as being invalid (a little red "X" beside them). I also can't find any info on these tables in <code>all_tables</code>. How do I get rid of these?</p>