Protected by Copyscape Web Copyright Protection Software

Search This Blog

Tuesday, December 3, 2013

Query to find Locked Tables

The following Query Will give you the details of Locked Objects....
SELECT c.owner
      ,vp.spid AS os_process
      ,fu.user_name locking_fnd_user_name
      ,fl.start_time locking_fnd_user_login_time
FROM fnd_logins      fl
    ,fnd_user        fu
    ,v$session       vs
    ,v$locked_object vlocked
    ,v$process       vp
    ,dba_objects     c
WHERE vs.sid = vlocked.session_id
AND vlocked.object_id = c.object_id
AND vs.paddr = vp.addr
AND vp.spid = fl.process_spid(+)
AND fl.user_id = fu.user_id(+)
--AND c.object_name LIKE '%' || upper(:P_Object_Name) || '%'
AND nvl(vs.status,'XX') != 'KILLED';

No comments:

Post a Comment