Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

are there any ways to reverse engineer Oracle trigger or sort of decompile it?

Are there any way to decompile or reverse engineer Oracle trigger? Any tools available, any free ones?

Thanks!

like image 638
o1e9 Avatar asked Jul 15 '10 14:07

o1e9


People also ask

Can we call triggers explicitly?

Like a stored procedure, a trigger is a named PL/SQL unit that is stored in the database and can be invoked repeatedly. Unlike a stored procedure, you can enable and disable a trigger, but you cannot explicitly invoke it. So no, a trigger cannot be explicitly called.

What is reverse engineering in ODI?

In ODI, reverse-engineering is the process of selecting metadata from a data server and populating the selected metadata into an ODI model. An ODI model contains objects or datastores such as tables, views, queues, and synonyms. ODI models also contain attributes, keys, and constraints for each datastore.


1 Answers

This may be done querying user_triggers or dba_triggers as such:

SELECT trigger_body FROM user_triggers where trigger_name = 'THENAME';

or

SELECT DBMS_METADATA.GET_DDL('TRIGGER','....') FROM DUAL

If the trigger code calls other code that is Wrapped (obsufacted) you will need to unwrap it, see this article or do a google search for "oracle unwrap pl/sql"

You can also use a Oracle managment or development tool to get the trigger source code.

like image 142
oluies Avatar answered Oct 20 '22 14:10

oluies