Set lock mode to wait #
Posted in 2013
Topics: Transactions, Locking & Isolation
Hi all,
This may be an obsolete question but "what are the implications of the
following statements in concurrency control:"
set lock mode to wait 10
update tab_name set.....Any adverse effects if we remove the "set lock mode to wait" statement?.
NB: we dont' have "transaction logging" so cannot use "begin work .....
rollback or commit work".
Thanks and best regards,
Long Nguyen
Australian Redcross Blood Service.
You'll start getting lock contention. Commands will fail that otherwise =
would have waited their turn for a lock.
j.
On Mar 20, 2013, at 6:57 AM, Long Nguyen wrote:
> Hi all,=20
> This may be an obsolete question but "what are the implications of the=20=
> following statements in concurrency control:"=20
> set lock mode to wait 10=20
> update tab_name set.....=20> Any adverse effects if we remove the "set lock mode to wait" =
statement?.=20
>=20
> NB: we dont' have "transaction logging" so cannot use "begin work =
.....=20
> rollback or commit work".=20
>=20
> Thanks and best regards,=20
> Long Nguyen=20
> Australian Redcross Blood Service.=20
>=20
>=20
> =
**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>=20
If you remove the SET LOCK MODE TO WAIT then if the update encounters any
locked records it will abort. Without transaction logging, any rows that
it has already updated will remain updated (they cannot be rolled back
without logging turned on!) and any rows that would have been updated if
the lock were not encountered will NOT be updated. You will have a
partially completed 'transaction'. With the LOCK MODE WAIT set the update
will wait for ten seconds for any locks it encounters to be released by the
other session(s) that are holding those locks before returning an error and
aborting increasing the probability that your update will complete without
incident.
You REALLY should turn logging on!
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, Mar 20, 2013 at 6:57 AM, Long Nguyen
<longhuynguyen51@yahoo.com.au>wrote:
> Hi all,
> This may be an obsolete question but "what are the implications of the
> following statements in concurrency control:"
> set lock mode to wait 10
> update tab_name set.....> Any adverse effects if we remove the "set lock mode to wait" statement?.
>
> NB: we dont' have "transaction logging" so cannot use "begin work .....
> rollback or commit work".
>
> Thanks and best regards,
> Long Nguyen
> Australian Redcross Blood Service.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--f46d0444edf1e21db504d85932a9