I am facing an unusual problem in Oracle SQL Developer. When I try to compile a store procedure it hangs up the Oracle SQL DEveloper Screen and I can't do any activity, except to kill the SQL developer instance and start again.
But the same issue. Anybody faced such problem? I am new to oracle.
Here some additions to the problem 开发者_C百科I waited for 5 to 10 mins and got this error
ORA-04021 timeout occurred while waiting to lock object
But I am the only person working on this instance of Oracle
One of your previous attempts to create the procedure, which you killed, is still stuck and active. You need to kill that Oracle session using http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
The other source of this error is another process in your database is running the procedure while you are trying to compile it. Use this query to figure out which process is running it:
select sess.sid, sess.username, sql_text
from v$sqlarea sqlarea, v$session sess
where sess.sql_hash_value = sqlarea.hash_value
and sess.sql_address = sqlarea.address
and sess.username is not null;
Query v$locked_object
to see if any objects that are currently locked are in use by your Stored Procedure. If so, track down the query/module which has it locked & end the query.
The link given by Thomas gives the details of how to kill a session, once the sessions are killed & v$locked_object
shows no records, you should be able to compile fine.
精彩评论