audit program activity [message #194350] |
Thu, 21 September 2006 11:09 |
aline
Messages: 92 Registered: February 2002
|
Member |
|
|
Hello,
I would like to capture in an audit table which program ( this information is in the v$session ) is modifying a table.
I have a test code:
drop sequence myseq;
drop table test;
drop table audit_test;
create table test ( a number primary key, b number);
create sequence myseq;
create table audit_test ( myseq number,
a number,
program varchar2(128),
machine varchar2(128)
);
create or replace trigger insert_test
before insert on test
for each row
DECLARE
BEGIN
insert into audit_test values (mySeq.nextval,:new.a,null,sys_context('USERENV', 'HOST') );
END;
/
Do you have an idea?
thk in advance
|
|
|
|
|
|
Re: audit program activity [message #194537 is a reply to message #194365] |
Fri, 22 September 2006 09:55 |
aline
Messages: 92 Registered: February 2002
|
Member |
|
|
Ok,
audit is one thing and there are many exemple in google.
So I didn't find the information I was searching.
And maybe it's normal.
I'm using the 9.2 database
In the documentation there is no place from the program in the audit.
Maybe I'm wrong, but I think no.
So I re-ask my question in another way:
I want in an audit table:
The XXX programm from the YYY machine has inserted row number 4 at the time T
So indeed one row for action.
Maybe this is possible with the Oracle audit but I'm not sure and I don't see how. In this case an exemple could be great.
If not, how to do that (with my solution, the only problem is with the program column)?
thk
|
|
|