ORA-04021: timeout occurred while waiting to lock object
FranklinFaces.com
FranklinFaces.com - Oracle & SQL Server Database Forums for all IT Professionals
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



ORA-04021: timeout occurred while waiting to... Expand / Collapse
Message
Posted 6/9/2009 2:06:32 AM Post #134
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
Hi,

I was getting the following error while compiling a procedure:


 alter procedure ECOM1.MAINRUN compile
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object ECOM1.MAINRUN

I checked the following two queries to see if there were any blockers etc.. and the query came back with no rows and still I was not sure where to go from here.

SQL> select * from dba_blockers;

no rows selected

SQL> select * from dba_waiters;

no rows selected

So then I ran the compile statement again and then ran this query:

SQL> select p.spid "Thread", s.sid "SID-Top Sessions",
substr(s.osuser,1,15) "OS User", substr(s.program,1,25) "Program Running"
from v$process p, v$session s
where p.addr=s.paddr
order by substr(s.osuser,1,15);

Using this query, I found a couple of processes that were running.  I killed them using the OS process id at OS prompt:

kill -9 <thread from above>

That fixed it .

SQL> alter procedure ECOM1.MAINRUN compile;

Procedure altered.

 

Thanks,


 

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: silencer

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:05am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.073. 9 queries. Compression Disabled.