Re: Does a lock on a parent table locks up alter table disable constraint?

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: genegurevich@xxxxxxxxxxxxxxxxxxxxx
  • Date: Fri, 19 May 2006 16:49:26 -0700

Hi Gene,

There are many types of locks.
see:
http://oraclesvca2.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#BABCJIAJ

Some are not compatible with others.

Performing an ALTER TABLE would normally cause an ORA-54 Resource Busy error
if the table is in an incompatible lock mode.  As ALTER TABLE requires an
exclusive
lock, it is incompatible with all other lock modes.

What type of lock is the developer holding on T2?

The DBA_LOCKS view will show what types of locks are held when this happens.

Jared


On 5/19/06, genegurevich@xxxxxxxxxxxxxxxxxxxxx < genegurevich@xxxxxxxxxxxxxxxxxxxxx> wrote:

Hi all:

I am encountering a following situation:

- one developer is executing alter table T1 disable foreing key FK1. The
FK1 is referrting to a table T2 as a parent table


- another developer is holding a lock on the T2


The first developer's command is stuck until the second one releases the lock. I have seen it several times today Why does this happen? I would understand that an ENABLE command would be affected by that, but why would a DISABLE command be affected?

thank you

Gene Gurevich


-- //www.freelists.org/webpage/oracle-l





--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: