Cheeky Cockatoo

Life Advice and Stories, Travel, Oracle Tech, Good Food and More

lock_review.sql

Download Script

select substr(s.username, 1, 12) username, substr(s.program, 1, 30) program,
s.sid, s.serial# s#, p.spid, substr(event, 1, 35) event, to_char(logon_time,'DD-MON-YYYY HH24:MI:SS') Login_Time
from v$session s, v$process p, v$session_wait w where s.sid = w.sid and p.addr = s.paddr
and s.username is not null
and event like 'library%'
order by logon_time desc
/