Link to home
Start Free TrialLog in
Avatar of samir25
samir25

asked on

Error: ORA-04021: timeout occurred while waiting to lock object

hi
i am gettign this error on saving the pl/sql

Error: ORA-04021: timeout occurred while waiting to lock object packname.procedurename

what can i do to remove the lock?
Avatar of GGuzdziol
GGuzdziol
Flag of Luxembourg image

Probably someone is executing the code You want to ovewrite. You can either wait for him to finish or kill his session.
Avatar of samir25
samir25

ASKER

no i am workign adn thats what its causing it.
i tried to kill the session with alter system kill session('29','1')
and it says the session doesnt exist

whats the corret way to find the session giving prob?
ASKER CERTIFIED SOLUTION
Avatar of GGuzdziol
GGuzdziol
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of samir25

ASKER

my dba killed al lthe sessions and i still get this error
Error: ORA-04021: timeout occurred while waiting to lock object ....when i save it..pls provide inputs as to why this is happ ..anything i can do to check
Maybe your session is holding the lock on that package. (Just guessing, though, without knowing the reason.) Ask your dba to drop the package while you are not connected to the database.
you need to kill one of the snp deamonds that hold the session from v$session from operating system point of view,,
Check the v$session about that sid and serial# is it still there marked as killed  , or it is not there at all.
If is marked as killed you need to kill the crospoinding OS process where you can get it from v$process.

Regards
Abdi