Home » RDBMS Server » Security » audit program activity
audit program activity [message #194350] Thu, 21 September 2006 11:09 Go to next message
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 #194351 is a reply to message #194350] Thu, 21 September 2006 11:15 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
why reinvent the wheel?
use AUDIT
Re: audit program activity [message #194353 is a reply to message #194351] Thu, 21 September 2006 11:38 Go to previous messageGo to next message
aline
Messages: 92
Registered: February 2002
Member
could you give me a simple example please?
Re: audit program activity [message #194365 is a reply to message #194350] Thu, 21 September 2006 12:33 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
are you incapaable or unwilling to use GOOGLE yourself?
Results 1 - 10 of about 6,400,000 for oracle audit.
Re: audit program activity [message #194537 is a reply to message #194365] Fri, 22 September 2006 09:55 Go to previous message
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

Previous Topic: Manage users for multi databases
Next Topic: read only user
Goto Forum:
  


Current Time: Thu Dec 08 04:18:56 CST 2016

Total time taken to generate the page: 0.08593 seconds