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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to delete a lock

Re: How to delete a lock

From: HansF <Fuzzy.Greybeard_at_gmail.com>
Date: Tue, 08 Aug 2006 00:04:34 GMT
Message-ID: <pan.2006.08.08.00.07.06.35863@gmail.com>


On Mon, 07 Aug 2006 16:51:52 -0700, dn.perl_at_gmail.com wrote:

>
> A table has been locked and I want to free it. I have
> looked at v$lock and v$session objects, but I don't know
> what entry to delete from where. What I do know is that
> nobody is using the database right now, and it is okay
> for me to delete the appropraite entry (whether from
> v$lock or v$session). Out of the first 5-10 links which
> turn up in a google or google-groups search for "delete
> lock oracle", no link provides a quick route to delete
> a lock and free the locked object.
>

It may be a matter of semantics, but ... you do not delete locks.

What you may do is terminate the session that currently has the lock, allowing the system to release the lock.

Two sites useful in determining who (which session) has the lock:

http://www.akadia.com/services/ora_locks_survival_guide.html http://www.psoug.org/library.html

Once you determine which session is holding the lock, - IF you can not convince the session owner to terminate the session   voluntarily,
- you may terminate the session manually using the

   'alter system kill session' command
  as described in the "SQL Language Reference" manual for   the version of database you use. (see http://docs.oracle.com)

-- 
Hans Forbrich   (mailto: Fuzzy.GreyBeard_at_gmail.com)   
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.
Received on Mon Aug 07 2006 - 19:04:34 CDT

Original text of this message

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