Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> New audit trigger question

New audit trigger question

From: Teresa Redmond <NJZLIRWUWYGI_at_spammotel.com>
Date: Fri, 12 Mar 2004 19:58:41 GMT
Message-ID: <183ee00bc16d9c13f058e871e9540856@news.teranews.com>


Hello again;

Here is my trigger:

CREATE OR REPLACE TRIGGER AUDIT_TRIGGER
AFTER UPDATE OR DELETE
ON TABLE_X
BEGIN
  if updating then
    INSERT INTO audit_table
    SELECT 'TABLE_X', USER, SYSDATE,
           s.osuser, s.program, 'UPDATING', s.terminal     FROM v$session s, v$sql sq
    WHERE (S.SQL_ADDRESS = sq.ADDRESS
    AND S.osuser IS NOT NULL
    and s.osuser not like '%SYSTEM%');
  else
    if deleting then

      INSERT INTO audit_table
      SELECT 'TABLE_X', USER, SYSDATE,
             s.osuser, s.program, 'DELETING', s.terminal
      FROM v$session s, v$sql sq
      WHERE (S.SQL_ADDRESS = sq.ADDRESS
      AND S.osuser IS NOT NULL
      and s.osuser not like '%SYSTEM%');
    end if;
  end if;
END audit_trigger;

Today's issue: User is developing in Forms 6i, not updating data. Trigger is firing and adding rows to audit_table in the "updating" part of the trigger above. Why would that happen?

Thanks so much!

-- 
Teresa Redmond
Programmer/Analyst III
Anteon Corporation
tredmond at anteon dot com
Received on Fri Mar 12 2004 - 13:58:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US