473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to disable trigger as soon as it got triggered.

I want to disable a trigger as soon as it got triggered. But dont know how to do this.

Could anyone please help me?

Thanks,
sanjaya
Feb 24 '09 #1
5 3931
debasisdas
8,127 Expert 4TB
what is the triggering event ?
Feb 24 '09 #2
Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE temp_tab1(id_         VARCHAR2(20));
  2. CREATE TABLE temp_tab2(table_name_ VARCHAR2(20), accessed_date_  DATE);
  3.  
  4. CREATE OR REPLACE TRIGGER temp_tab1_trigger 
  5. BEFORE INSERT OR DELETE OR UPDATE ON temp_tab1 
  6. BEGIN
  7.      DBMS_OUTPUT.put_line('Temptab1 is updated');
  8.      INSERT INTO temp_tab2 VALUES ('temp_tab1',SYSDATE);
  9. END;
  10. /

I want to store the update time of temp_tab1 in temp_tab2 and immediately DISABLE temp_tab1_trigger
Feb 24 '09 #3
debasisdas
8,127 Expert 4TB
try the following link, will work in 11g

link
Feb 24 '09 #4
Hi,
Can we call a procedure that would call a disable trigger command ?
Is is a posible solution for this question.
If not, kindly explain?
Regards
Mar 10 '09 #5
debasisdas
8,127 Expert 4TB
That will cause the session to hang , because you can't disable a trigger while it is still executing.
Mar 10 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Pecos Bill | last post by:
Salve, non riesco a disabilitare un trigger su sqlserver nč da query analyzer, nč da enterprise manager. In pratica tal cosa riuscivo a farla in Oracle con TOAD, mentre qui non riesco. Mi...
4
by: Alexander Pope | last post by:
I am using db2 udb v8.2 AIX I have created trigger, however I am not confident it meets industry standards. If I make it fail, I cant tell from the message where it is failing. what can I add to...
2
by: Fluxray | last post by:
--Background: I have a webform including a datagrid. The datagrid is using template. Its ItemTemplate is used to display a look-up-table with labels. its EditItemTemplate is used to edit a row in...
1
by: Zyrthofar | last post by:
Hi I have three textboxes indicating the individual RGB values of a color. When the user leaves a textbox (Leave event), I check the validity of that number and saves the three values to a set of...
8
by: Frank van Vugt | last post by:
Hi, If during a transaction a number of deferred triggers are fired, what will be their execution order upon the commit? Will they be executed in order of firing or alfabetically or...
0
by: gshawn3 | last post by:
Hi, I am having a hard time creating a Trigger to update an Oracle database. I am using a SQL Server 2005 Express database on a Win XP Pro SP2 desktop, linked to an Oracle 10g database on a...
3
by: PeanutB | last post by:
Hi, I am having some trouble with creating triggers. I have created a trigger on a table SorDetail which calls a stored procedure and passes it the data that have now been inserted or updated in...
0
by: patelaashish | last post by:
Hi, I am using the following trigger but it seems to do the second update and not the first update. CREATE TRIGGER ON . FOR UPDATE AS IF EXISTS(SELECT FINISHTIME FROM PREPLOG WHERE...
0
by: patelaashish | last post by:
Hi, I am using the following trigger but it seems to do the second update and not the first update. CREATE TRIGGER ON . FOR UPDATE AS IF EXISTS(SELECT FINISHTIME FROM PREPLOG WHERE...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.