How Do I Find All Code PDF
How Do I Find All Code PDF
Page 1 of 2
Overflow
How do I find all code, triggers from an oracle database that relate to specific tables?
I have a problem where I need to remove all code and triggers from a database that relate to certain tables in order for a Solaris package to install. Long complicated story but I need to start with a clean slate. I've managed to remove all the existing tables/synonyms, but how to locate the code/triggers from sqlplus that is related? Unfortunately, it's not feasible to drop the database and recreate it.
oracle10g
asked Jul 15 '09 at 3:42 Matt 5,104 2 21 52 87% accept rate feedback
2 Answers
Well, it turns out all the table names are prefixed with my module name DAP. So, to find all the table names and public synonyms with sqlplus: select table_name from all_tables where table_name like 'DAP%'; select synonym_name from all_synonyms where table_name like 'DAP%';
To get a list of triggers and sequences select trigger_name from all_triggers where table_name like 'DAP%'; select sequence_name from all_sequences where sequence_name like 'DAP%';
To get a list of all the constraints select table_name, constraint_name from all_constraints where table_name like 'DAP%';
To get the DAP related code: select text from dba_source where name like 'DAP%';
feedback
http://stackoverflow.com/questions/1129288/how-do-i-find-all-code-triggers-from-an-ora... 16/10/2012
oracle10g - How do I find all code, triggers from an oracle database that relate to specific ... Page 2 of 2
You should be able to query the system table ALL_TRIGGERS to find the triggers. It has a table_name column. You can probably find the other related objects with different system tables (been awhile since I've messed with Oracle). http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2107.htm
answered Jul 15 '09 at 3:50 Nate 1,250 4 12 feedback
Not the answer you're looking for? Browse other questions tagged oracle10g or ask your own question.
http://stackoverflow.com/questions/1129288/how-do-i-find-all-code-triggers-from-an-ora... 16/10/2012