Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: unlocking tables

Re: unlocking tables

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Thu, 14 Feb 2002 05:54:18 +1100
Message-ID: <3c6ab667$0$27939$afc38c87@news.optusnet.com.au>


In $ORACLE_HOME/rdbms/admin there's a provided script called catblock.sql. Run that, and you create a view called dba_locks. If you then subsequently run the utllockt.sql script (also provided, and also found in the same directory), you'll get a nice cascaded display of who is holding what locks, and who is waiting for said locks.

Tables don't usually get locked, though (well, not often in an exclusive way). Much more often, it's going to be row-level locks... unless you have a developer writing code that constrains at a much higher level than Oracle would naturally want to do.

Locks are taken when you perform DML or DDL, so the "command" to unlock anything is to wait for the DDL operation to finish, or for DML transactions to complete. DML is completed by issuing the commit or rollback commands.

Regards
HJR

--
----------------------------------------------
Resources for Oracle: http://www.hjrdba.com
===============================


"Cameron Abbott" <cvabbott_at_altavista.com> wrote in message
news:a4e0u7$jm9$1_at_bcarh8ab.ca.nortel.com...

> Hi,
>
> Does anyone know of an sql statement that will find a locked table and the
> sql statement causing the lock? Also, what is the command to unlock the
> table.
>
> Thanks
> Cameron
>
>
Received on Wed Feb 13 2002 - 12:54:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US