defer action until lock can be obtained?
Posted in 2009
Topics: General Discussion
Hi, A while back I thought I read somewhere that IDS had a setting or some syntax that would let an action like alter table be deferred until an exclusive or share mode lock could be obtained on the table. Is this so? I can't find any references to it now - hope it wasn't just a dream... Sometimes the person who performs our production database alterations has to keep trying till quite late at night before he can get the alterations done - due to not being able to get the required access to the tables. I'm hoping this deferred feature does exist - can someone point me to it please? We're using IDS 11.50 tc3. Thanks, Bryce Stenberg.
Best you could do is:
SET LOCK MODE TO WAIT; -- indefinite/eternal wait mode
BEGIN WORK;LOCK TABLE table_to_be_altered IN EXCLUSIVE MODE;
ALTER TABLE table_to_be_altered MODIFY.....
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. 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, Oct 7, 2009 at 6:31 PM, BRYCE STENBERG <bryce@hrnz.co.nz> wrote:
> Hi,
>
> A while back I thought I read somewhere that IDS had a setting or some
> syntax
> that would let an action like alter table be deferred until an exclusive or
> share mode lock could be obtained on the table.
>
> Is this so? I can't find any references to it now - hope it wasn't just a
> dream...
>
> Sometimes the person who performs our production database alterations has
> to
> keep trying till quite late at night before he can get the alterations done
> -
> due to not being able to get the required access to the tables. I'm hoping
> this deferred feature does exist - can someone point me to it please?
>
> We're using IDS 11.50 tc3.
>
> Thanks,
> Bryce Stenberg.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001517478cce521ee40475608496
You might be looking for the environment variable IFX_DIRTY_WAIT which waits for dirty readers to get out of the table when trying actions that require exclusive accesses. You set this variable to the maximum number of seconds you want to wait. John F. Miller III STSM, Support Architect miller3@us.ibm.com 503-578-5645 IBM Informix Dynamic Server (IDS) ids-bounces@iiug.org wrote on 10/07/2009 03:31:17 PM: > [image removed] > > defer action until lock can be obtained? [17414] > > BRYCE STENBERG > > to: > > ids > > 10/07/2009 03:32 PM > > Sent by: > > ids-bounces@iiug.org > > Please respond to ids > > Hi, > > A while back I thought I read somewhere that IDS had a setting or some syntax > that would let an action like alter table be deferred until an exclusive or > share mode lock could be obtained on the table. > > Is this so? I can't find any references to it now - hope it wasn't just a > dream... > > Sometimes the person who performs our production database alterations has to > keep trying till quite late at night before he can get the alterations done - > due to not being able to get the required access to the tables. I'm hoping > this deferred feature does exist - can someone point me to it please? > > We're using IDS 11.50 tc3. > > Thanks, > Bryce Stenberg. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
If you want to understand a bit more about the subject you can check by blog post: http://informix-technology.blogspot.com/2006/10/when-exclusive-is-not-really-exc lusive.html Please excuse me for the publicity... Regards. On Thu, Oct 8, 2009 at 12:32 AM, John Miller iii <miller3@us.ibm.com> wrote: > You might be looking for the environment variable IFX_DIRTY_WAIT > which waits for dirty readers to get out of the table when trying actions > that require exclusive accesses. You set this variable to the maximum > number of seconds you want to wait. > > John F. Miller III > STSM, Support Architect > miller3@us.ibm.com > 503-578-5645 > IBM Informix Dynamic Server (IDS) > > ids-bounces@iiug.org wrote on 10/07/2009 03:31:17 PM: > > > [image removed] > > > > defer action until lock can be obtained? [17414] > > > > BRYCE STENBERG > > > > to: > > > > ids > > > > 10/07/2009 03:32 PM > > > > Sent by: > > > > ids-bounces@iiug.org > > > > Please respond to ids > > > > Hi, > > > > A while back I thought I read somewhere that IDS had a setting or some > syntax > > that would let an action like alter table be deferred until an exclusive > or > > share mode lock could be obtained on the table. > > > > Is this so? I can't find any references to it now - hope it wasn't just a > > > dream... > > > > Sometimes the person who performs our production database alterations has > to > > keep trying till quite late at night before he can get the alterations > done - > > due to not being able to get the required access to the tables. I'm > hoping > > this deferred feature does exist - can someone point me to it please? > > > > We're using IDS 11.50 tc3. > > > > Thanks, > > Bryce Stenberg. > > > > > > > > > ******************************************************************************* > > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --000e0cd39cb65729a7047574865d