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

Re: locks

From: Raymond van Daelen <daelen_at_wxs.nl>
Date: Wed, 29 Nov 2000 23:36:06 +0100
Message-ID: <3A2584D6.20D41B22@wxs.nl>

wegorz wrote:
>
> Try this one:
>

Thanks,
almost the answer, now I can see the table, but still not what records are actually locked. I also found out that it is possible to select the SQL statement that the user who holds the lock executes, whixh should lead to the rows locked (and, even better, what causes the locK) by issuing:

select s.sid

       ,s.username
       ,s.osuser
       ,NVL(s.machine,'?') machine
       ,NVL(s.program,'?') program
       ,s.process F_Grund
       ,p.spid B_Ground
       ,x.sql_text
from sys.v_$session s
     ,sys.v_$process p
     ,sys.v_$sqlarea x

where s.osuser like lower(NVL('&OS_User','%'))
   and s.username like upper(NVL('&Oracle_user','%'))
   and s.sid like NVL('&SID','%')
   and s.paddr = p.addr
   and s.type != 'BACKGROUND'
   and s.sql_address = x.address
   and s.sql_hash_value = x.hash_value

   order by s.sid

however, for some reason i do not get the sqlstatement, even thoudg there really is a lock and the sql statement is present (in sqlarea I can find it!) ?

Raymond Received on Wed Nov 29 2000 - 16:36:06 CST

Original text of this message

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