Find lock records with Users and Responsibilities
I am using following query to find lock records but sometimes it does not show correct record. Means it does not show that user and responsibility which is locked.
select session_id "sid",s.SERIAL# "Serial",
object_name,
substr(os_user_name,1,10) "Terminal",
substr(oracle_username,1,10) "Locker",
nvl(lockwait,'active') "Wait",
decode(locked_mode,
2, 'row share',
3, 'row exclusive',
4, 'share',
5, 'share row exclusive',
6, 'exclusive', 'unknown') "Lockmode",
OBJECT_TYPE "Type",fs.USER_NAME,fs.RESPONSIBILITY_NAME,fs.USER_FORM_NAME
from v$locked_object lo,all_objects ao,v$session s,fnd_form_sessions_v fs
where lo.OBJECT_ID = ao.OBJECT_ID