Oracle trigger

How to  prevent insert/update/delete trigger in oracle
poznanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
sdstuberConnect With a Mentor Commented:
do you want to prevent the creation of a trigger?

if so,  remove the "create trigger" privilege from the user.

If you want to stop the execution of a trigger, disable it


alter trigger yourschema.yourtrigger disable;

0
 
poznanAuthor Commented:
Oracle
0
 
sdstuberConnect With a Mentor Commented:
if you want to block execution conditionally, that is, run it sometimes and ignore it others,  you can't.

but you could instead put conditions inside the trigger so that when it runs it might not do anything sometimes.

for example... this trigger would insert a row into another table but only if the current user is me


CREATE OR REPLACE TRIGGER sample_trigger
BEFORE UPDATE
ON sample_table
FOR EACH ROW
BEGIN
   if user = 'SDSTUBER' then
             insert into some_other_table (a,b,c) values(1,2,3);
   end if;
END ;
/
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Aaron ShiloChief Database ArchitectCommented:
>> How to  prevent insert/update/delete trigger in oracle

please explain yourself .
0
 
maheshchariCommented:
in oracle there no insert tiger,delete tiger
0
 
sdstuberCommented:
maheshchari,

The question isn't about "tigers", it's about TRIGGERS, and Oracle most certainly DOES have insert and delete triggers
0
 
daddyhawCommented:
yo can disable all triggers on a table with the following command

alter table mytable disable all triggers;

this will disbale all the update,insert,delete triggers from firing
0
 
sdstuberCommented:
With a closing comment of "it helps"  it seems like useful information was given

I recommend

Split of

http:#34868210
http:#34868215


The other comments are either asking for input, wrong or duplicate information
0
 
modus_in_rebusCommented:
poznan,

Since you haven't taken proper action to close this question, I'll go ahead and close it myself by following the expert's recommendation.

modus_in_rebus
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.