Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Does a lock on a parent table locks up alter table disable constraint?
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_at_discoverfinancial.com <
genegurevich_at_discoverfinancial.com> 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
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Fri May 19 2006 - 18:49:26 CDT
![]() |
![]() |