joi, 13 martie 2014

Find a trigger, searching by the raised exception content

Sometimes, you can be caught in a sensitive situation, staring at the error issued by some application, and being clueless about where from that error appeared. If it is a database trigger, you can easily find:

select * from user_source where type='TRIGGER' and upper(text) like '%some text%another piece of text%and so on%';
   
As you can see, you can look after more than one piece of text, by once.

But keep in mind my advice, better put in the exception text the name of the trigger and maybe some other information you can think is useful (the name of the table, some inline variables, etc).

Niciun comentariu:

Trimiteți un comentariu