Re: Client disconnect makes server locked. How to deal with it?
Date: 20 Sep 2002 17:38:19 -0700
Message-ID: <4306a83.0209201638.31cedae7_at_posting.google.com>
vavalee_at_163.com (Jim Lee) wrote in message news:<2bd37b7.0209191908.37967d23_at_posting.google.com>...
> After my client locks some tables, network crashes. Then those tables
> can't unlock correctly. How to let my program deal with this situation
> automaticlly?
There are, as far as i know, no standard functions or so that kan do this.
The thing is that a session hangs, Oracle migth fix this after a while, but that usualy is to late. The thing you have to do is kill the sessions. So in some way you have to find out if a session actualy have a user logd on.
There is a ALTER SYSTEM function you can use. I think the syntax is
like this:
ALTER SYSTEM KILL SESSION 'integer,integer'
The first integer is sid the second is #session
This values can be obtaind from the view v_$session. You also can find the objects that are locked, and by whom, from the view v_$locked_objects.
Regards
Odd M
Received on Sat Sep 21 2002 - 02:38:19 CEST