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

Home -> Community -> Usenet -> c.d.o.misc -> Auditing by Trigger - can I use v$session

Auditing by Trigger - can I use v$session

From: TurkBear <johng_at_mm.com>
Date: Wed, 27 May 1998 15:36:36 GMT
Message-ID: <356c31db.6907602@news2.mm.com>


I have developed the following auditing trigger for 1 of my tables:



CREATE OR REPLACE TRIGGER JOHNMAS.LID1
AFTER INSERT OR UPDATE OR DELETE ON JOHNMAS.TEST_LID Begin
if inserting then
insert into audit_lid values('Insert',sysdate,user) ; elsif updating then
insert into audit_lid values('Update',sysdate,user); elsif deleting then
insert into audit_lid values('Delete',sysdate,user); else
raise_application_error(-20100,'Undefined Action...'); end if;
end;

This works fine, but I would like to use the osname ( from v$session ) instead of user - I have some generic user names so the osname would precisely id the actual person invoking the trigger -

Is there a way to access a dynamic view from within a trigger ?

Any and All help much appreciated...

John Greco
Email or post - Email to john.greco_at_dot.state.mn.us

PS
System is Oracle 7.3.x.x on IntranetWare 4.11 Received on Wed May 27 1998 - 10:36:36 CDT

Original text of this message

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