Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Logging user-activity
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