Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I need to delete all tables (hundreds) in the SYS schema that someone accidentally created with sqlplus. Looking in dba_tables and dba_objects, I don't see a way to distinguish these tables from pre-existing stock system tables. Any help appreciated.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Most tables in SYS schema are created when database is installed. You probably know approximately when the new tables were created, so query like this should work:

select *
from dba_objects
where object_type='TABLE'
  and owner='SYS'
  and created > <date before new tables were created>;
share|improve this answer
    
I noticed this solution, it's just surprising that there is not more definitive metadata on this. –  ThomasMcLeod Aug 15 '13 at 14:09
    
Probably because all tables in SYS schema are assumed to be system tables –  sjk Aug 16 '13 at 6:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.