Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: managing locks
On Fri, 9 Oct 1998, Torsten Borchert wrote:
>
> on server site you should set in the sqlnet.ora the parameter
> sqlnet.expire_time = 10
> This means that every 10 minutes the server will look for dead
> connections and delete them.
>
> Ludwig Loraing wrote:
> >
> > Jim Poe wrote:
> >
> > > I am trying to find and delete a persistent row lock. I tried to run
> > > catblock.sql, but it falls over on a select from x$kgllk.
> > >
> > > How do I set up the database to view existing locks and how do I delete
> > > unwanted locks?
> >
> > If you or somebody else figures out how to delete these locks, please tell
> > me!
> > I am sick of shutting down the database, just because the oracle
> > server does not notice that a client died. By the way does someone
> > know how I can delete such a session?
To kill a session, just use
alter system kill session 'sid,serial#';
Once the session is gone, the lock will be gone. There is definitely no reason to hace to shut down the database! You could write a script to nuke any session holding a lock that was blocking someone else for some specified peroid of time.
The best solution is to fix the application, if that is an option. It probably shouldn't hold locks like that to begin with.
--
Jeremiah Wilton http://www.wolfenet.com/~jeremiah
Received on Fri Oct 09 1998 - 09:36:20 CDT