Re: ora04021:timeout occurred while waiting to lock object ...

From: Yong Huang <yong321_at_yahoo.com>
Date: 1 Apr 2004 15:11:19 -0800
Message-ID: <b3cb12d6.0404011511.695f1a31_at_posting.google.com>


tracykim10_at_yahoo.com.hk (tracy) wrote in message news:<5c91cce9.0404010029.6b29baad_at_posting.google.com>...
> hi,
> when i run this sql,i got this error
> SQL> grant all on raw_ptptn_data to unitem_role;
> grant all on raw_ptptn_data to unitem_role
> *
> ERROR at line 1:
> ORA-04021: timeout occurred while waiting to lock object
> SHAHRUL.RAW_PTPTN_DATA
> ...
> no row return from V$locked_object.

Hi, tracy,

Check dba_ddl_locks or dba_lock_internal. Tom Kyte's book talks about dba_ddl_locks. Or check x$kgllk. A look at v$session_wait for library cache locks waits and matching the library object handle with x$kglobj.KGLHDADR can also tell you the session that holds the locks.

v$lock and v$locked_object only shows enqueue locks, not library cache locks.

If you post your message to comp.databases.oracle.server, you'll get an answer faster.

Yong Huang Received on Fri Apr 02 2004 - 01:11:19 CEST

Original text of this message