I tried to register a schema in Oracle the other day to validate an XML document. The code I used was fairly simple:
dbms_xmlschema.registerSchema(schemaURL => 'http://www.myCompany.com/schema',
schemaDoc => :schemaCLOB);
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:
dbms_xmlschema.deleteSchema(schemaURL => 'http://www.myCompany.ca/schema',
delete_option => dbms_xmlschema.DELETE_INVALIDATE);
That de-registered the schema, but all of the objects were left behind.
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.
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 all_tables
. How do I get rid of these?