Solved

Oracle trigger

Posted on 2011-02-10
10
498 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
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 15

Expert Comment

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

please explain yourself .
0
 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Getting TNS:Connect timeout occurred while opening the application 5 79
Get the parent node - XMLTYPE 9 73
create a nested synonym 4 25
pl/sql - query very slow 26 60
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.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

773 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