| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Locks in Oracle 9i
"Anurag Varma" <avdbi_at_hotmail.com> wrote in message news:<8C5eb.6775$Zm3.3354_at_news01.roc.ny>...
> "Jan Pompe" <jan.pompe_at_gmx.de> wrote in message news:blams2$9vui9$1_at_ID-137428.news.uni-berlin.de...
> > Hi Daniel,
> >
> > you're right: I don't need locking at all and I don't do it explicitly
> > either. Oracle does it for me, unwanted though.
> >
> > Situation: I sit at home and try to write a Java-application (for my
> > Bachelor's thesis) that connects to the Oracle-Server at the university.
> > Normally, everything is ok, but every now and then my application hangs
> > (for reasons yet unknown to me). So I shut down the app on my side, but
> > when I restart it, it doesn't do any database operations at all, but
> > waits infinitely instead. When I start Oracle's Lock-Manager
> > (server-side via mstsc) it tells me, that the table is locked - by me.
> > The only way to resolve this (so far) is to reboot the server (which is
> > ok, because I'm the only one who uses this server at the moment), wait
> > for 5 - 10 Minutes and then start my application again.
> >
> > But there should be another way to remove persistent locks, right?
> >
> > Regards - Jan
> >
> --snip--
>
> Jan,
>
> Oracle will release the locks once you are done with your session.
> If you do not disconnect in a clean manner, then the session lingers on
> and the locks persist.
> Apart from telling you that you should take care to disconnect cleanly
> and to release locks as soon as you are done with it,
> your choice would be to find the session that is holding the lock and kill it.
>
> How you kill it, is your choice. alter system kill session ... or kill -9.
> The alter system syxtax can be found in the sqlreference/admin manual.
>
> You do not .. I repeat .. you do not have to bounce Oracle to release locks!
>
> Anurag
your session is still active. just becuase you disconnect, dose not mean the session closes. you have to kill your session. i doubt you will have priviledges to do this on your school computer. Anyway here is how you do it.
use v$session view(you probably wont have access to this). find the sid and serial# for your session.
alter system kill session 'sid,serial#';
easiest way to get around this is to go to otn.oracle.com, download a copy of oracle and install at home. then you can do whatever you want. Received on Tue Sep 30 2003 - 11:03:44 CDT
![]() |
![]() |