Monday, October 23, 2017

Query to find locked objects in Oracle

SELECT   c.owner
       , c.object_name
       , c.object_type
       , b.SID
       , b.serial#
       , b.status
       , b.osuser
       , b.machine
       , b.program
       , b.module
       , b.action
FROM v$locked_object a
          , v$session b
          , dba_objects c
WHERE  b.SID = a.session_id
AND a.object_id = c.object_id
ORDER BY module

-->  If you want to forcefully kill any session then it can be done using


alter system kill session 'sid,serial#'

e.g.
alter system kill session '123,5325'

No comments:

Post a Comment

Query to get the Concurrent Program along with Value Set details

SELECT fcpl1.user_concurrent_program_name       ,fdfcuv.end_user_column_name       ,ffvs.flex_value_set_name value_set_name       ,ffvt.appl...