472,811 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 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 7584
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.