top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can we disable database trigger in Oracle, if yes then how?

+1 vote
380 views
Can we disable database trigger in Oracle, if yes then how?
posted Oct 20, 2014 by Vidhya Sagar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

Yes, we can disabled the triggers.

You can almost certainly disable one trigger from another using an EXECUTE IMMEDIATE statement:

EXECUTE IMMEDIATE 'ALTER TRIGGER trigger_name_here DISABLE';

However, you definitely shouldn't be using triggers for application logic. It's a messy business, not least due to the fact that triggers aren't guaranteed to fire in order, but also because of the kind of "problem" you're experiencing.

It would be much easier and significantly safer to move all of the functionality you described to a stored procedure or package, and use triggers only where necessary for validation purposes.

answer Oct 21, 2014 by Amit Kumar Pandey
Similar Questions
0 votes

Oracle:Can database trigger written on synonym of a table and if it can be then what would be the effect if original table were accessed?

0 votes

Can database trigger written on synonym of a table and if it can be then what would be the effect if original table is accessed

...