Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Logging user-activity
"Howard J. Rogers" <hjr_at_dizwell.com> writes:
> "kodo" <inbox_at_kodo.me.uk> wrote in message
> news:2hlrv2FeqirkU2_at_uni-berlin.de...
>> Hello,
>>
>> we're running an oracle 9i DB on a unix-system.
>> I wonder if it's possible to log all statements a peticular user
>> executes. I know it's possible to log "all" activity but I'd be just
>> interested in what some users do.
>>
>> What's the easiest way to do that?
>
> Do you really mean "all" statements? And if so, to what level of detail?
>
> You can audit a user easily enough: see
> http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_48a.htm#2059984
> (watch for wrapping, but as a for-example: audit select on emp by access;).
> 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.
>
> And for select statements, you have fine-grained auditing.
>
> There are other options too (such as triggers, perhaps). It depends really
> on *why* you want to do this, and precisely what results you want to
> capture, under what circumstances, and to what level of detail.
Hi Howard,
thanks four your answer. We'll have a user here soon who will have to
view and modify some tables sometimes.
But we want to be sure he does that only when there's a reason to, and
because of that we can't just disallow access etc. but want to check
what he actually did. (I know this sounds strange and I usually wouldn't
do it that way but I'm not the one to decide it in this case)
Because of this we want to log ALL statements, also selects done by the
user. He won't work there often and also don't use a lot of statements
probably.
greetings,
kodo Received on Thu May 27 2004 - 06:05:23 CDT