473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Online reorg and super exclusive lock cause many problems

Hello freaks,

we have many problems with our online reorg and no idea how to resolve
it.

We had to do an online reorg beacause of 24 h online business.
We start the reorg-statements (table by table) in a loop with the
following statement:
reorg table xxx.yyy inplace allow write access.

Now each time the reorg is running the following will happen: The
reorg wants to set a super exclusive lock on a special big table
(xxx). The table is very big and many many users will access this
table all over the time.

We thougt, that there must be a queue or something like that, so that
the super exclusive lock can work and the reorg will go on, but we can
see that the reorg is waiting and waiting and waiting to get the lock
which will never happen (because of the other users?).

Is there any good solution without keeping the users out?
Is there any possibility to see which table is still in proccess of
reorg because they are startet asyncronous unfortunately.

Many thanks,
Lara
Nov 12 '05 #1
9 7713
Hi Lara,

(Sidenote: In my experience "freak" in English has a much more negative
conotation that the almost loving "computer freak" used in German :-)

At least in DB2 for LUW (is that what you're on, or DB2 for zOS?)
I have never heard of such a thing as a "super exclusive lock" and
online reorg is designed through and through to work in an isolation
than less invasive than CS (e.g. it locks only the row it operates on).

In DB2 for zOS to teh best of my knowledge online reorg makes a copy,
so I imagine ther must be a blackout period for catchup of teh copy and
the swap.

So... can you give a few more details because at least I can't make
heads or tails of it.

Cheers
Serge
Nov 12 '05 #2
Hey, I like the freak moniker...

We do need to Z lock the tcb a few times during online reorg...I think
this happens once at the start, and once at the end of the reorg when
modifying some in memory table structures.

I'm not sure about our lock behavior though...will pass your note on to
the guys who wrote this, and post back here.

Serge Rielau wrote:
Hi Lara,

(Sidenote: In my experience "freak" in English has a much more negative
conotation that the almost loving "computer freak" used in German :-)

At least in DB2 for LUW (is that what you're on, or DB2 for zOS?)
I have never heard of such a thing as a "super exclusive lock" and
online reorg is designed through and through to work in an isolation
than less invasive than CS (e.g. it locks only the row it operates on).

In DB2 for zOS to teh best of my knowledge online reorg makes a copy,
so I imagine ther must be a blackout period for catchup of teh copy and
the swap.

So... can you give a few more details because at least I can't make
heads or tails of it.

Cheers
Serge

Nov 12 '05 #3
Here's the response:
"This lock is a 'special waiter' lock, designed spcifically to wait for
anyone with a conflicting lock to leave while never starving new lock
requests coming in. Basically, we wait until the last person who held a
conflicting lock BEFORE we made our request to release their lock, but
we should never wait for new lockers.

So someone out there isn't releasing their table lock - either a
connection never does commit/rollback or does only commits with hold so
that the table lock is never released."
Sean McKeough wrote:
Hey, I like the freak moniker...

We do need to Z lock the tcb a few times during online reorg...I think
this happens once at the start, and once at the end of the reorg when
modifying some in memory table structures.

I'm not sure about our lock behavior though...will pass your note on to
the guys who wrote this, and post back here.

Serge Rielau wrote:
Hi Lara,

(Sidenote: In my experience "freak" in English has a much more
negative conotation that the almost loving "computer freak" used in
German :-)

At least in DB2 for LUW (is that what you're on, or DB2 for zOS?)
I have never heard of such a thing as a "super exclusive lock" and
online reorg is designed through and through to work in an isolation
than less invasive than CS (e.g. it locks only the row it operates on).

In DB2 for zOS to teh best of my knowledge online reorg makes a copy,
so I imagine ther must be a blackout period for catchup of teh copy
and the swap.

So... can you give a few more details because at least I can't make
heads or tails of it.

Cheers
Serge

Nov 12 '05 #4
Sean McKeough wrote:
Here's the response:
"This lock is a 'special waiter' lock, designed spcifically to wait for
anyone with a conflicting lock to leave while never starving new lock
requests coming in. Basically, we wait until the last person who held a
conflicting lock BEFORE we made our request to release their lock, but
we should never wait for new lockers.

So someone out there isn't releasing their table lock - either a
connection never does commit/rollback or does only commits with hold so
that the table lock is never released."


Hmm - doesn't that sort of mean then that in a busy system the re-org
will never start ? Is this DB2 LUWser or Mainframe ?

Nov 12 '05 #5
Hi Serge,

thank you so much for the 'freak'-hint. I did not mean it negative at
all, in the feuture I will use experts :-)

We use db2 UBD V7.1 on Unix, and there IS a super exclusive lock, at
least the db monitor is telling that...

The effect at the end is the following: The lock is held and the
working users fill up the transaction logs and after a time the logs
are full, the reorg is hanging in a strange state of doing nothing,
even if the transactions are rolled back and the users are gone. All
we could do is 'force application' to kill the backend process and
this will make the db to crash and restart.

The IBM-Support told us, that there is no possibility to 'see' what
the db is doing exactly during the reorg, and there is no message
telling us 'table xyz is reorganized', going on with table abc. In
this case we had the possibility to start the reorg statements step by
step and we are not trapped in the asynchronous mechanism.

Many thanks for any help,
Lara
Serge Rielau <sr*****@ca.ibm.com> wrote in message news:<2u*************@uni-berlin.de>...
Hi Lara,

(Sidenote: In my experience "freak" in English has a much more negative
conotation that the almost loving "computer freak" used in German :-)

At least in DB2 for LUW (is that what you're on, or DB2 for zOS?)
I have never heard of such a thing as a "super exclusive lock" and
online reorg is designed through and through to work in an isolation
than less invasive than CS (e.g. it locks only the row it operates on).

In DB2 for zOS to teh best of my knowledge online reorg makes a copy,
so I imagine ther must be a blackout period for catchup of teh copy and
the swap.

So... can you give a few more details because at least I can't make
heads or tails of it.

Cheers
Serge

Nov 12 '05 #6
how big is your "special big table"? Is it partition table? I am
planning to use this online reorg and I also worry about my 110GB
table.

qw****@gmx.de (Lara) wrote in message news:<1c**************************@posting.google. com>...
Hello freaks,

we have many problems with our online reorg and no idea how to resolve
it.

We had to do an online reorg beacause of 24 h online business.
We start the reorg-statements (table by table) in a loop with the
following statement:
reorg table xxx.yyy inplace allow write access.

Now each time the reorg is running the following will happen: The
reorg wants to set a super exclusive lock on a special big table
(xxx). The table is very big and many many users will access this
table all over the time.

We thougt, that there must be a queue or something like that, so that
the super exclusive lock can work and the reorg will go on, but we can
see that the reorg is waiting and waiting and waiting to get the lock
which will never happen (because of the other users?).

Is there any good solution without keeping the users out?
Is there any possibility to see which table is still in proccess of
reorg because they are startet asyncronous unfortunately.

Many thanks,
Lara

Nov 12 '05 #7
Sorry, Version is 8.1 FixPack 6
Nov 12 '05 #8
Mark Townsend wrote:
Sean McKeough wrote:
Here's the response:
"This lock is a 'special waiter' lock, designed spcifically to wait
for anyone with a conflicting lock to leave while never starving new
lock requests coming in. Basically, we wait until the last person who
held a conflicting lock BEFORE we made our request to release their
lock, but we should never wait for new lockers.

So someone out there isn't releasing their table lock - either a
connection never does commit/rollback or does only commits with hold
so that the table lock is never released."


Hmm - doesn't that sort of mean then that in a busy system the re-org
will never start ? Is this DB2 LUWser or Mainframe ?

Actually no. BTW, Bruce Lindsay gave a very detailed talk on online
Reork a couple of years ago at a DB2 conference :-)
What happens is that the lock divides the transactions into old and new.
Ones all the _old_ ones are gone reorg can start its mery business.
I think it has to do with new transactions being aware that the a reorg
is going.
When reorging a row. New transactions will see the new row, old ones
will see the old version (or at least a tumbstone of it).
online-reorg is comparatively slow which is why it's also called
trickle-reorg.

Cheers
Serge
Nov 12 '05 #9
There is get snapshot for table support for reorg (you can see what
state the reorg is in).

What you need to do is see which applications are not releasing their
table locks.

Lara wrote:
Hi Serge,

thank you so much for the 'freak'-hint. I did not mean it negative at
all, in the feuture I will use experts :-)

We use db2 UBD V7.1 on Unix, and there IS a super exclusive lock, at
least the db monitor is telling that...

The effect at the end is the following: The lock is held and the
working users fill up the transaction logs and after a time the logs
are full, the reorg is hanging in a strange state of doing nothing,
even if the transactions are rolled back and the users are gone. All
we could do is 'force application' to kill the backend process and
this will make the db to crash and restart.

The IBM-Support told us, that there is no possibility to 'see' what
the db is doing exactly during the reorg, and there is no message
telling us 'table xyz is reorganized', going on with table abc. In
this case we had the possibility to start the reorg statements step by
step and we are not trapped in the asynchronous mechanism.

Many thanks for any help,
Lara
Serge Rielau <sr*****@ca.ibm.com> wrote in message news:<2u*************@uni-berlin.de>...
Hi Lara,

(Sidenote: In my experience "freak" in English has a much more negative
conotation that the almost loving "computer freak" used in German :-)

At least in DB2 for LUW (is that what you're on, or DB2 for zOS?)
I have never heard of such a thing as a "super exclusive lock" and
online reorg is designed through and through to work in an isolation
than less invasive than CS (e.g. it locks only the row it operates on).

In DB2 for zOS to teh best of my knowledge online reorg makes a copy,
so I imagine ther must be a blackout period for catchup of teh copy and
the swap.

So... can you give a few more details because at least I can't make
heads or tails of it.

Cheers
Serge

Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Raquel | last post by:
This question if for UDB on LUW. Suppose I take regular database backups of my database Monday: database backup <ts1> Tuesday: Tablespace reorged and imagecopied <ts2> Friday: database...
2
by: TomHorner | last post by:
I have several quick questions about reorg's, and a request (favor). 1. The documentation says that reorg "Reorganizes an index or a table" I cannot see how one would reorg ONE particular index...
4
by: GB | last post by:
Hi All, I would like to optimize my reorgs. Here are several ways to shorten reorgs or keep data online during reorgs: - db2 reorg has some shrlevel option: reference or change - db2 v7 has...
4
by: News | last post by:
I have 18 years of mainframe DB2, and I just starting working with UDB LUW V8.1 FixPack 6 on Sun Solaris last week. I have been dismayed on the lack of detailed info available in the manuals on...
16
by: andy.standley | last post by:
Hi, we are running DB2 V8.2 (8.1.0.80) on redhat linux and I am trying to set the reorg to be online. I use the control center on the box - db2cc and then configure automatic maintenance wizard -...
3
by: Arun Srinivasan | last post by:
Please correct me if I am wrong 1. no 2 processes can have exclusive lock on same object (by object, same row or same table) 2. on deadlock incident between 2 processes only one of them will be...
3
by: jane | last post by:
Hi, Just wondering, is there any way to do the online reorg to use temporary tablespace instead of tablespace table existed. since that is really a waste to have some space allocated aside...
2
by: heyzulu59 | last post by:
I thought that an online backup could always be run while other processes with the database went about their business. However today I noticed that certain processes in my production database were...
0
by: tg | last post by:
I have been using the online reorg for over 2 years without any problems. I have just encountered a log full condition after having started the online reorg on the same table that I have been...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.