Re: Manually Unlocking records in IDS
Posted in 2005
... unless it's a global XA transaction
"Art S. Kagel" <kagel@bloomberg.net> a 'crit dans le message de
news:42CAAF2E.6020406@bloomberg.net...
> JoeT wrote:
> > Hi...
> >
> > I have a PHP application under development and have an annoying
> > problem.
> >
> > I am purposely trying to kill the code (testing) and sometimes when I
> > trap an error, I'm getting codes bad of 244 and 107, saying that a
> > record is locked. I can't do anything in dbaccess either.
>
> Once the session has completely died the locks will be released. IDS
never
> retains locks owned by defunct sessions. Sometimes a session survives its
> client which may be what you are experiencing. There are usually one of
two
> causes:
>
> 1- The session is rolling back a larger transaction that the client began.
> 2- The server has not yet recognized that the client is defunct (this
mostly
> happens with Windows clients, but I've seen it with UNIX clients
occassionally).
>
> For the first case there's nothing you can do until the transaction
rollback
> completes (onstat -u will show the sessions and the flags will include an
> 'R' for rollback for the session that was killed). Just monitor the
> rollback, the nwrites columns in onstat -u will double from its value at
the
> moment you killed the client when the rollback is just about complete.
This
> is bacause the same number of pages written in the transaction now have to
> be rewritten with their original values during the rollback.
>
> In the second case once you've identified the session id in onstat -g ses
> you can kill the session with onmode -z <sessid>.
>
> Art S. Kagel
>
> > What's the proper way to kill the locked record without restarting the
> > server?
> >
> > Thanks,
> > Joe
> >