Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle locks
Stefano wrote:
> Hi,
>
> I need to keep track of when a lock is created and destroyed on a
> specific table, I know that V$LOCK (and other views) contains the
> information I need, but I need to create a sort of audit trail. I
> tried with the following:
>
> audit insert on V$LOCK
> audit delete on V$LOCK
>
> and I verified that when a lock is created one or more rows are
> created (and can be seen) in V$LOCK, but nevertheless the addition of
> new rows is not recorder in the audit trail table and infact:
>
> select USERNAME, TERMINAL,
> to_char(TIMESTAMP,'dd-mon-yyyy hh:mm:ss'),
> OBJ_NAME, ACTION_NAME
> from dba_audit_object
>
> returns no new rows.
> I guess that this is because rows are added somewhere else and since
> V$LOCK is a view the events of INSERT and DELETE are not related to
> the view itself but to the tables underneath.
> I tried to retrieve the information about which tables lay under
> V$LOCK view but I wasn't able.
> Is there somebody that is willing to provide me this piece of
> information?
> Is there somebody that knows a different solution to my problem
>
> Thank you very much in advance
>
> Regards
>
> Stefano
Why do you want to audit locking? Trying to see if you can slow Oracle down to a pathetic crawl, an academic exercise, or is there a business case?
Also, how many transactions per time period and how many simultaneous users?
Daniel Morgan Received on Tue Feb 25 2003 - 15:05:03 CST