Friday, March 10, 2017

kill a session which is locked in Oracle apps


This Article is used to explain how to kill a session which is locked

Check if the Package or table are locked using the below query

SELECT b.object_name,
       a.session_id,
       a.oracle_username,
       a.os_user_name,
       a.process,
       a.locked_mode
  FROM v$locked_object a,
       all_objects b
 WHERE a.object_id = b.object_id


b.    Get the serial number for the session based on the session id got from above qyery.


SELECT SID,
       serial#,
       ownerid,
       status,
       server,
       username,
       osuser,
       process,
       machine
FROM v$session
WHERE SID = ‘Session id from above query’

c.    Command to kill the session

ALTER SYSTEM KILL SESSION 'Sid from query, Serial# from Query 2'

No comments:

Post a Comment

Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...