DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: ORA-04082: NEW or OLD references not allowed in table level triggers

  1. #1
    Join Date
    Oct 2003
    Location
    India
    Posts
    39

    ORA-04082: NEW or OLD references not allowed in table level triggers

    hi ,
    I am getting the following error i am creating the below trigger

    create or replace trigger tr_cdc
    *
    ERROR at line 1:
    ORA-04082: NEW or OLD references not allowed in table level triggers


    please help.
    thanks


    create or replace trigger tr_cdc
    after insert on cdcsample for each row
    begin
    insert into cdcsample@dev(a1,a2,a3,a4) values(:new.a1,:new.a2,:new.a3,:new.a4);
    end trigger;

  2. #2
    Join Date
    Feb 2001
    Posts
    180
    I am able to create the trigger for an insert to a local table
    cdcsample2.
    So, it could be the problem for the remote-database.
    Did you try to create a procedure that is able to insert a record in cdcsample@dev.
    And then call this procedure from the trigger.
    Regards
    Ben de Boer

  3. #3
    Join Date
    Apr 2003
    Location
    South Carolina
    Posts
    148
    try
    create or replace trigger tr_cdc
    after insert on cdcsample for each row
    REFERENCING NEW AS NEW OLD AS OLD
    begin
    insert into cdcsample@dev(a1,a2,a3,a4) values(:new.a1,:new.a2,:new.a3,:new.a4);
    end trigger;


    Hth
    Gregg

  4. #4
    Join Date
    Oct 2003
    Location
    India
    Posts
    39
    thank you both of you .
    I will try both options and will post

    again thanks for the time and help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width