| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: unlocking tables
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...Received on Wed Feb 13 2002 - 12:54:18 CST
> 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
>
>
![]() |
![]() |