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 -> Re: Logging user-activity

Re: Logging user-activity

From: Tobias Rathje <snapseflaske_at_fasanix.com>
Date: Thu, 27 May 2004 13:02:08 +0200
Message-ID: <pan.2004.05.27.11.02.08.408208@fasanix.com>


On Thu, 27 May 2004 20:36:31 +1000, Howard J. Rogers wrote:
> So you could audit access to particular objects by a user (that example
> would audit *any* access to emp, by all users, but you just select the
> entries you want out of sys.aud$), though that only audits generally: you
> won't see the precise selects or updates that Scott does on the EMP table,
> merely that he did some selecting or updating.
>
> If you want specifics, then for DML, you've got Log Miner which shows you
> the precise SQL statements issued by whom and when.

Another solution is to force SQL-tracing for specific users with a logon trigger like this:

CREATE OR REPLACE TRIGGER sqltrace AFTER LOGON ON DATABASE
BEGIN
 IF (user IN ('FOO', 'BAR')
 THEN
  EXECUTE IMMEDIATE 'ALTER SESSION SET sql_trace = true';  END IF;
END; Then you can see all the statements the user executes in the trace files generated on the server. Note that this will have a performance impact for those users, because of the overhead in writing the trace files.

Regards,

Tobias Received on Thu May 27 2004 - 06:02:08 CDT

Original text of this message

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