Search: For:
Browsing Single Category
www.dbatoolz.com ORACLE DBA Forums Forum › Topic Id: 4444 | Permalink

locks ?

Topic ID: 4444
Created By: 2011-AUG-09 12:10:54 [Archuamu]
Updated By: 2012-FEB-08 17:55:31 [Adoyadoy]
Status: Open
Severity: Normal
Read Only: No
14227
2011-AUG-09 12:10:54
User
 
 
Registered On: Aug 2011
Total Posts: 1
hi,
  In database 3 programs are running and all those programs are creating order 
in oracle application. I don't see any locks ( blocking and waiting ) but still 
programs are not moving forward.
  Any input how to handle this problem. My basic question is why those programs 
stuck ?

thx
archu
14233
2011-AUG-10 16:08:10
Moderator
 
 
Registered On: Mar 2006
Total Posts: 290
few options:

good:

   check v$session_wait view

better:

   turn SQL trace and process the trace file using TKRPOF

- HTH
14734
2012-FEB-08 17:55:31
User
 
 
Registered On: Feb 2012
Total Posts: 2
> hi,
>   In database 3 programs are running and all those programs are creating 
> order in oracle application. I don't see any locks ( blocking and waiting ) 
> but still programs are not moving forward.
>   Any input how to handle this problem. My basic question is why those 
> programs stuck ?
> 
> thx
> archu

You can try below:

-- To see specific locks: 
select s.sid, s.serial#, p.spid
from
   v$session s,
   v$process p
where
   s.paddr = p.addr
and
   s.sid in (select SESSION_ID from v$locked_object);

----------------------------------------------------------------  
--- Show sessions that are blocking each other
select	'SID ' || l1.sid ||' is blocking  ' || l2.sid blocking
from	v$lock l1, v$lock l2
where	l1.block =1 and l2.request > 0
and	l1.id1=l2.id1
and	l1.id2=l2.id2
/