Solved

Oracle trigger

Posted on 2011-02-10
10
497 Views
Last Modified: 2012-08-14
How to  prevent insert/update/delete trigger in oracle
0
Comment
Question by:poznan
10 Comments
 

Author Comment

by:poznan
ID: 34868199
Oracle
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 34868210
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
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 500 total points
ID: 34868215
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
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 34933504
>> How to  prevent insert/update/delete trigger in oracle

please explain yourself .
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Expert Comment

by:maheshchari
ID: 34933906
in oracle there no insert tiger,delete tiger
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 34934021
maheshchari,

The question isn't about "tigers", it's about TRIGGERS, and Oracle most certainly DOES have insert and delete triggers
0
 
LVL 1

Expert Comment

by:daddyhaw
ID: 34934982
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
 
LVL 73

Expert Comment

by:sdstuber
ID: 34975688
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
 

Expert Comment

by:modus_in_rebus
ID: 35067583
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now