Thursday, February 4, 2021

Error : timeout occurred while waiting to lock object

I am getting error timeout occurred while waiting to lock object when i Compile a package. I want to remove the lock.

SELECT * FROM v$access  where object='package_name'
Take that SID and pass it to the below query and take sid and serial#
SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND' and 
s.sid=?
Kill Session
Use the below  query to kill the corresponding session
ALTER SYSTEM KILL SESSION 'sid,serial#'

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...