473,434 Members | 1,854 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,434 software developers and data experts.

ONLINE REORG

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 - and can get runstats
to be online but reorg only offers offline at the activities settings.
I have tried to understand why - I thought that online was always
offered ? I think that all my indexes are type 2 - I ran some reorg
indexes all on the tables to convert them if they were not. For each
table I can set up a task to do a reorg online, but not through the
maintenance wizard.

What am I missing ?

ta for any clues

andy

Nov 12 '05 #1
16 5401
<an***********@ecngroup.co.nz> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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 - and can get runstats
to be online but reorg only offers offline at the activities settings.
I have tried to understand why - I thought that online was always
offered ? I think that all my indexes are type 2 - I ran some reorg
indexes all on the tables to convert them if they were not. For each
table I can set up a task to do a reorg online, but not through the
maintenance wizard.

What am I missing ?

ta for any clues

andy

You need to enable LOGRETAIN=ON instead of the default of circular logging.
Make sure you understand what the implications of that are, and that you
have some way of dealing with the log files.

Also, if you use LOGRETAIN=ON, this may affect you backup/recovery strategy,
since you MUST have the logs available when doing an on-line backup.
Probably the best way to ensure that the logs are available with an on-line
backup is to include them in the backup image.
Nov 12 '05 #2
thanks for the reply
not sure how this affects a reorg - why doed logretain change the way I
can do a reorg of a table?

Nov 12 '05 #3
thanks for the reply
not sure how this affects a reorg - why does logretain change the way I
can do a reorg of a table?

andy

Nov 12 '05 #4
Have a read of the REORG command in the Command Referece at

ftp://ftp.software.ibm.com/ps/produc...S/db2n0e81.pdf

Note the explanation for the parameters "ALLOW READ ACCESS" and "ALLOW
WRITE ACCESS". It would appear that ALLOW READ ACCESS is the default.
Does the db2cc present these options?

Larry Edelstein

an***********@ecngroup.co.nz wrote:
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 - and can get runstats
to be online but reorg only offers offline at the activities settings.
I have tried to understand why - I thought that online was always
offered ? I think that all my indexes are type 2 - I ran some reorg
indexes all on the tables to convert them if they were not. For each
table I can set up a task to do a reorg online, but not through the
maintenance wizard.

What am I missing ?

ta for any clues

andy

Nov 12 '05 #5
Larry,
The db2 gui seems to not do any configuration except when to do it and
to what tables. It allows backup and runstats to be online but reorg
only online. I am making tasks to do all the tables that I want and
that allows configuration like the cli command

andy

Nov 12 '05 #6
Andy,

When I open my CC and then right-click on a table, I select "Reorganize"
and I see a popup that gives me the choice between online and offline.
It also has a tab that allows me to schedule the REORG. Granted I am on
windows, but it should be the same.

8.1.0.80 would appear to be fp8. Where are you using the db2cc from? Are
you sure that your db2cc is at V8? If it is, I'm not sure I have an answer.

Larry Edelstein

an***********@ecngroup.co.nz wrote:
Larry,
The db2 gui seems to not do any configuration except when to do it and
to what tables. It allows backup and runstats to be online but reorg
only online. I am making tasks to do all the tables that I want and
that allows configuration like the cli command

andy

Nov 12 '05 #7
Larry,
Sorry - that it was I have done too. But in the tools -> wziards you
can setup maintenance. This offers reorg but only offline. I have used
this to setup runstats but reorg only says offline not online. I have
run the control center on windows and see the same as on linux. Yes it
is fp8.


andy

Nov 12 '05 #8
I think the following is set up for online reogs to be automated.
A) I don't think the db has to be in logretain=recovery mode as the online
reorg is automatically revocered from a crash via the active logs which are
always available wether in circular logging or roll forward enbled mode.
B) For autoamtion online, one has to set the parm AUTO_REORG ON in the db
cfg or use the the db2 cc and define an online maintenca time window (page 3
Timing in the wizard).

Once that is set it is DB2 that will decide wether or not the table needs to
be roerg'ed. If yes, then it will check the time. If time is in the online
window defined then the online reorg will happen. If time is out the window
then no online reorg happens.
That's why you don't choose the online option for reorg; it is because DB2
decides ( Ig guess it runs a reorgchk under the covers) wether the table
needs to be and if in the window it will reorg it online.
That's the way it was explained to me and I may need to be corrected, but it
still makes sense to me!!!
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Larry" <la***@nospam.net> a écrit dans le message de news:
bJ******************@fe10.lga...
Andy,

When I open my CC and then right-click on a table, I select "Reorganize"
and I see a popup that gives me the choice between online and offline. It
also has a tab that allows me to schedule the REORG. Granted I am on
windows, but it should be the same.

8.1.0.80 would appear to be fp8. Where are you using the db2cc from? Are
you sure that your db2cc is at V8? If it is, I'm not sure I have an
answer.

Larry Edelstein

an***********@ecngroup.co.nz wrote:
Larry,
The db2 gui seems to not do any configuration except when to do it and
to what tables. It allows backup and runstats to be online but reorg
only online. I am making tasks to do all the tables that I want and
that allows configuration like the cli command

andy


Nov 12 '05 #9
"Pierre Saint-Jacques" <se*****@invalid.net> wrote in message
news:bX********************@weber.videotron.net...
I think the following is set up for online reogs to be automated.
A) I don't think the db has to be in logretain=recovery mode as the online
reorg is automatically revocered from a crash via the active logs which
are always available wether in circular logging or roll forward enbled
mode.


You are correct. I was in error.
Nov 12 '05 #10
Pierre,
Thanks. I set up online and offline windows - that is fine. I go to the
activities of the maintenance wizard and it gives me options for
backup, reorg, runstats. But for reorg it says offline and the other
two online. I have now checked and changed the AUTO_REORG param to ON
but I can't restart the database and it says it needs that to make it
take effect. Maybe that will work ...

andy

Nov 12 '05 #11
Hi,

The automatic REORG introduced in v8.2 supports only offline REORGs, it
does not support online REORGs that's why the GUI offers you an offline
window only.

Ivan
an***********@ecngroup.co.nz wrote:
Pierre,
Thanks. I set up online and offline windows - that is fine. I go to the
activities of the maintenance wizard and it gives me options for
backup, reorg, runstats. But for reorg it says offline and the other
two online. I have now checked and changed the AUTO_REORG param to ON
but I can't restart the database and it says it needs that to make it
take effect. Maybe that will work ...

andy


Nov 12 '05 #12
Andy:

Automatic maintenance feature is *currently* offline because that's the
way it can be scheduled given a specific window. Online reorg runs in
trickle mode and is not meant for speed. So, the window to complete
online reorg really depends on applications running against the
database.

If you are willing to take the command line option, let me know. It is
pretty simple and can be scripted and run from a scheduler/cron.

1. Runstats daily
2. Check reorgchk for table and index using sysproc functions and
export it to a table.
3. Pick the table & index that qualify fo reorg.
4. Start the online reorg for those tables only
5. Check and make sure that the reorg table completed and then start
index reorg.
6. Do a runstats, rebind all packages usin rebind command or just run
db2rbind if it permits.
8. Once again, run reorgchk for tables and indexes using sysproc and
dump it into the table.
9. Generate reports from this data.
10. Optionally. you can also export the sysproc.snapshot_tbreorg data
into a table and generate reports out of it. Even better, you can now
use the table function for list history command to export history reorg
data into a table and do the analysis.

You can also setup mechanism to page and let you know if reorg is
running for longer duration and if it's blocking a user application.
Online reorg being just like any other application connection will
block user application if it needs but only for a short period of time
during lock conversion where it needs to drain the old scanners. One
good feature is online reorg does not respect LOCK_TIMEOUT db cfg. So,
it will continue to wait on lock, but that might cause logs filesystem
to fill up if it ends up being the application holding the oldest log.

So, online reorg is complex underneath compared to offline mode and
cannot be scheduled to run automatically unless all the factors can be
pre-determined and rules can be setup before deploying it.

I am sure IBM already have their hands on developing a wizard to get it
running in online mode. Just a matter of which fixpak / version :)

HTH
Vijay

Nov 12 '05 #13
Thanks for that - from reading the docs it just seemed like reorg was
ok online.
some quotes
"DB2 V8.2 includes automated policy-based monitoring that can alert you
to the need for, or perform, automatic maintenance operations, such as
backup (which, by the way, is self-tuning in DB2 V8.2 and, for online
backups, will include the log files), table statistics collection
(which uses sampling and is 100% transparent to users and
applications), and online table reorganizations."

"The automatic reorganization feature can be enabled or disabled by
using the auto_reorg, auto_tbl_maint, and auto_maint database
configuration parameters.
If you are unsure about when and how to reorganize your tables and
indexes, you can incorporate automatic reorganization as part of your
overall database maintenance plan.
Tables considered for automatic reorganization are configurable by you
using the Automatic Maintenance wizard from the Control Center or
Health Center. "

maybe my auto_reorg, auto_tbl_maint, and auto_maint (which are all set
to ON) have not come into play yet as they were turned on and the
database requires stopping or all apps disconnecting....

All I have done is add tasks for each table such as

CONNECT TO XXXXX;
REORG TABLE ZZZZZZZZZZZ_YYYYYY INDEX
ZZZZZZZZZZZ_YYYYYYY INPLACE ALLOW WRITE ACCESS START ;
CONNECT RESET;
andy

Nov 12 '05 #14
Andy:

Does it mean that we can now setup automatic online reorg?
I looked up online doc and as of V8.2 / FP7, the reorg was still
offline. Maybe i am missing a link here, can you provide a link to your
source doc?

Thanks much!

Vijay

Nov 12 '05 #15
Vijay
I have not made it work online yet - would be good to say I had!
But from what I read it seems like it is possible. As I said - maybe I
have set the cfg params but have to wait for a restart before they are
active and then it will be possible...

andy

Nov 12 '05 #16
Andy:

Automatic maintenance related db cfg changes can be done online with
propagation class immediate. Can you send me the link to doc where it
specifies Automatic *online* reorg? The docs i have only talk about
automatic *offline* reorgs, online backups and online runstats.

I am also trying to setup a testcase.

Thanks much!

Vijay

Nov 12 '05 #17

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...
9
by: Lara | last post by:
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...
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...
0
by: Rojo Royo | last post by:
Hi, I am using Q replication on a system 390 running DB2 version 7. When I replicating data no problem and then suddenly someone does an online reorg, my databases loses synchronization source...
2
by: mike_dba | last post by:
DB2 V8 FP14 on RedHat Linux Single Partition Database Tables with LOB data Periodically, a large delete is performed by the application. I need to perform a Reorg. The nature of my database...
0
by: bwmiller16 | last post by:
Hi All - OSName: AIX NodeName: dr_aixdb01 Version: 5 Release: 3 dr_aixdb01$db2level DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL08027"
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...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.