Thursday, July 28, 2011

Table Locked By EBS User - By Khurram

Table Locked By EBS-R12 User - By Khurram



SELECT
      d_c.owner As Schema_Name
      ,d_c.object_name As Schema_Obj
      ,d_c.object_type As Schema_Obj_Type
      ,v_p.pid As Process_ID
      ,v_p.spid AS OS_Process_ID
      ,v_s.process As Process_#
      ,v_s.status As Session_Status
      ,v_s.module As Apps_Module
      ,v_s.machine As Apps_MAchine
      ,f_u.user_name As Locked_By
      ,f_l.start_time As Locked_On
      ,v_s.osuser As OS_User
      ,v_l_o.oracle_username As Apps_User     
FROM
      fnd_logins        f_l
      ,fnd_user         f_u
      ,v$locked_object  v_l_o
      ,dba_objects      d_c
      ,v$process        v_p
      ,v$session        v_s   
WHERE
      v_l_o.object_id = d_c.object_id
AND   v_s.sid = v_l_o.session_id
AND   v_p.pid = f_l.pid(+)
AND   f_l.user_id = f_u.user_id(+)
AND   v_s.paddr = v_p.addr
AND   v_p.spid = f_l.process_spid(+)
AND   nvl(v_s.status,'ABC') != 'KILLED'
AND   d_c.object_name LIKE '%' || upper('&Table_Name_R_LeaveBlank') || '%'

;

No comments:

Post a Comment