trigger question

I have a user request that when a new row being inserted into certain table, s/he wants to be notified(via e-mail, pager etc) about when, what has been changed and who changed it.

Can this being done by trigger If yes, how If no, what can help to implement this feature

Posted On: Thursday 15th of November 2012 09:10:27 PM Total Views:  425
View Complete with Replies

Related Messages:

trigger to trace user session errors   (221 Views)
I have the below trigger to trace user sesssion: create or replace trigger trace after logon on database begin if user = 'BATCH' then execute immediate 'alter session set sql_trace=true'; end if; end; / but as soon as this trigger created, the user will get errors when they log on to the DB, the errors ORA-00604
trigger the db-link availability   (117 Views)
Dear all, Can db-link to be trigger automatically if the link is not established
trigger insert or update   (180 Views)
HI, Can somebody can tell me the syntax to: Identify if the event is an insert or an update CREATE OR REPLACE TRIGGER trigger_name BEFORE INSERT OR UPDATE ON table_name FOR EACH ROW BEGIN IF insert THEN bla bla bla ELSE bla bla bla END IF; END;
trigger error   (109 Views)
Hi Friends, What is wrong with my trigger create or replace trigger emp_trig after insert or update on emp for each row when to_char(:new.hire_date,'DD-MON-YYYY')='01-JAN-2001' begin :new.hire_date=null; end; / error line 4 missing left parenthesis .... S.O.S. pleeeeaaaasssseeeee.....
trigger   (104 Views)
is there a command i can use to turn of all the triggers in a given schema
resumable trigger not valid :-(   (99 Views)
Hi all, what is wrong on this statement Do you have an idea Thank you!!! Christian CREATE OR REPLACE TRIGGER ck.logon_ck AFTER SUSPEND ON DATABASE declare BEGIN alter session enable resumable timeout 3000 name 'Krischan'; END;
replication based on triggers   (223 Views)
gurus... Urgently help required. In oracle,How do we implement replication based on triggers(Once the data insert /update /delete the trigger should fire and the data should be replicated.At pressent it is happenig based on job interval)
Sequence of Execution when a Procedure triggers a Database Trigger   (83 Views)
Hi Everyone, Could someone please help me out to know that if I have an Update statement in a porcedure after which a Database Trigger is triggered then will the procedure execution moves on in a different thread side by side with the trigger thread or will it wait for the trigger to complete and then the execution of the proc moves on.
Error trigger oracle   (286 Views)
I have the following trigger TRIGGER VERIF_ACTIVOS AFTER DELETE OR UPDATE OF "IDUSUARIOBAJA" ON ADMSAT4.AREA_CENTRO FOR EACH ROW DECLARE existe integer; BEGIN select count(*) INTO existe FROM AREACENTRO_ACTIVO where AREACENTRO_ACTIVO.IDAREA_CENTRO=:old.IDAREA_CENTRO and IDUSUARIOBAJA = 0; IF UPDATING OR DELETING THEN IF (:NEW.IDUSUARIOBAJA 0 AND existe>0) THEN RAISE_APPLICATION_ERROR('-20050','No puede dar de baja el rea / centro por tener activos asociados'); END IF; END IF; END VERIF_ACTIVOS; When it is executed by this statement in sqldeveloper: update area_centro set idusuariobaja = 3 where idarea_centro = '161' it is well executed. But when I execute the same statement with the webserver .net it raises me a ORA-01001: invalid cursor error. .Net needs permissions to be able to execute the triggers I don't understand that error. That is my first trigger in the application. I can execute all the oracle packages and statements but not the triggers.
MySQL trigger send a request/call ASP.NET server   (143 Views)
I am using MySQL 5. Is there any possibility that MYSQL trigger has capability to communicate with a .NET service/ASP.NET server What I want to do is if there is any update of a table record (eg. employee) sends a "notification" to a server so that latest data will be retrieved by the ASP.NET server.
creating Oracle s.p, triggers ,functions or table in c#   (175 Views)
, i got an requirement where the user inputs the oracle stored procedures,triggers,functions,tables,views or packages and when they press the execute button they should be execute or else if there's an error in the scripts while being debugged they must be roll backed .had any one worked on such stuff before
Creating triggers in MySql   (173 Views)
Hi everybody, can we create a after insert trigger in my sql and update the same record in the after insert trigger actually this is the error .... Can't update table 'testtable' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. corresponds to your MySQL server version for the right syntax to use near '' at line 4 can anybody help where i am going wrong...
how to avoid "ORA-04091 mutuating trigger or function may not see it."   (103 Views)
I have a trigger that throws that exception. Although it is an after trigger, it still throws that error. How culd i get over this Could someone pls help me When i insert into table IHALE_KATILINANIHALEDETAY(on which triger is created.), i just wantto select two fields into variables from another table named IHALE_KATILINANIHALE that is in relation with the table IHALE_KATILINANIHALEDETAY. By the way, what is strange is , when i delete that select clause in italic in "if inserting" block, it works fine... Here is my triger. (The line is 7) CREATE OR REPLACE TRIGGER TRIGGER_KATILIMEKLE AFTER INSERT OR DELETE ON IHALE_KATILINANIHALEDETAY REFERENCING NEW AS newRow FOR EACH ROW DECLARE srktkodu number; ihlkodu number; BEGIN IF INSERTING THEN select t2.srktkodu, t2.ihlkodu into srktkodu,ihlkodu from ihale_katilinanihaledetay t1, ihale_katilinanihale t2 where t1.ihlaltktgkodu=:newRow.ihlaltktgkodu and t1.detaykod=:newRow.detaykod; INSERT INTO ihale_katilimcilar t (t.aktif, t.SRKTKODU,t.ihlkodu,t.ihlaltktgkodu) VALUES('0', srktkodu, ihlkodu, :newRow.IHLALTKTGKODU); END IF; END TRIGGER_KATILIMEKLE;
Oracle triggers calling .exe   (192 Views)
Is it possible to have a trigger call a .NET executable Each time a new record is inserted or updated, I want to compare the newly inserted/updated record with another record in another database and do further processing. My idea was to have the trigger call a .NET app which will do the comparing and further processing. Has anyone encounter a issue like the one described above
Writing trigger is driving me crazy   (108 Views)
Ok, I'm trying to create a trigger for my database and from all the various internet sources, my syntax should be fine but MySQL is not agreeing. The trigger I'm writing is (line numbers just for ease of reading): 1 create trigger tr_bi_ewise_slice before insert on 2 ewise_slice for each row 3 4 BEGIN 5 set new.slice_timestamp := dateAdd(now(),INTERVAL -5 MINUTE) 6 END It gives me this: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') END' at line 5 I really dont see what it is that I'm doing wrong, can anyone tell me what is wrong with my syntax According to the format of my query should be fine.
Will an IMPORT fire database triggers?   (97 Views)
Will importing rows into a table fire the triggers on the target table
Using a trigger with SQL Loader   (114 Views)
I am using SQL Loader to load a text file into an Oracle table. This works ok. I have a trigger set up to insert into an audit table whenever I insert into the other table when I do the load. However, it is writing an audit record as many times as sql loader commits during the load. I realise I ccould increase the amount of records loaded before sql loader commits, but I dont want to put a huge strain on the rollback segments. Are there any suggestions. I am thinking that I may have to do a bit of tricky coding with the trigger! Here is my trigger code. Pretty simple. create or replace trigger sales_data_trig after insert on detail_rep begin if inserting then insert into sales_audit values( sales_audit_seq.nextval, 'LOAD SALES DATA', sysdate, 'N'); end if; end;
URGENT!! -Import failed : unable to Create Package Body, triggers , Package "Wrapped"   (177 Views)
Dear /Members I created an schema export dump file from my production database running (OS win 2000) When I tried to import into development (running, OS is win2000), a lot of objects (packages, triggers) do not get imported and I get the following error messages: Import failed : unable to Create Package Body, triggers , Package "Wrapped" ORA-03113: end-of-file on communication channel during import Would someone please let us know if they have seen this before and any suggestions as to how to overcome this problem will be highly appreciated!!!
triggers on sys.aud$   (176 Views)
My requirement is to notify (by email) whenever a row is inserted into sys.aud$(table used for recording audit information) .. My idea is to create a trigger on sys.aud$ table and that would email me whenever a row is inserted into this table.. trigger fires... My version of oracle is Can I use this email feature.. if yes then how.. If no then can i create a trigger in such a way that inserts row into another table in 8.1.7 database and then a trigger on this table to email.. Hope I did not confuse.. Please help
triggers   (143 Views)
Hi , I am writing a trigger. The code is as under :- table :- Emp_test empno Number ename Varchar2(25) Crt_by Varchar2(25) Cdate date I am written a trigger on the above table Create or replace trigger emp_trig before insert on emp_test for each row declare a varchar2(25); b date; begin select user into a from dual; select sysdate into b from dual; if inserting then update emp_test set crt_by=a and cdate=b where rowid=:new.rowid; ( i can also write rowid in (select max(rowid) from emp_test) end if; end; When i am trying to insert multiple records into the table its giving me mutating table error.. I tried creating it a statement level trigger but in that case it updates only the last row of the table with user and sysdate while i want all the rows to get updated which have been inserted.. I have also tried doing it through view but it does not works..