Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle locks

Re: Oracle locks

From: Andrew Allen <andrew.allen_at_handleman.com>
Date: Tue, 25 Feb 2003 22:34:55 GMT
Message-ID: <3E5BE285.5010403@handleman.com>


DA Morgan wrote:
> 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:

v$ views are virtual views. They DO NOT exist. The are presented by the engine so that we mortals can see what is going on inside. Besides V$LOCK is a public synonym. The real virtual table is V_$LOCK.

>>
>>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
>

I agree with Daniel. Tell us what your business problem and we will either tell you why it is not a problem or give you a way or two to solve it.

--
AjA
Received on Tue Feb 25 2003 - 16:34:55 CST

Original text of this message

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