473,811 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can REORGCHK and REORG be used together in a Script to select DB2 UDB objects to Reorg?

Hi all,

How can I implement using REORGCHK to tell REORG what DB2 UDB v8
tables, etc to perform REORG on?

Any example script will be highly appreciated.

Okonita

Sep 10 '07 #1
2 5010
On Sep 10, 5:12 am, Okon...@gmail.c om wrote:
Hi all,

How can I implement using REORGCHK to tell REORG what DB2 UDB v8
tables, etc to perform REORG on?

Any example script will be highly appreciated.

Okonita
Hi,

You can use info from syscat.tables to find out which tables are in
which status, etc.
Normally, for a table to be fully accessible and usable, the STATUS
must have a value of 'N' and ACCESS_MODE must have be'F'.
'N' means Normal and 'F' means fully accessible.

So, you can try something like
Select * from syscat.tables where status not in ('N') and access_mode
not in ('F') and tabschema=<sche maName>
might be Ok.
status ='C' means Check Pending etc...
You have to Set Integrity/Reorg on these tables depending on their
status.

Also, as the table might be in Reorg pending/Integrity Pending state
because it's parent in it such state.
So, You have to run reorg/Integrity pending on parent first folllowed
by the child.

Rahul

Sep 10 '07 #2
On Sep 10, 8:45 am, Rahul Babbar <rahul.babb...@ gmail.comwrote:
On Sep 10, 5:12 am, Okon...@gmail.c om wrote:
Hi all,
How can I implement using REORGCHK to tell REORG what DB2 UDB v8
tables, etc to perform REORG on?
Any example script will be highly appreciated.
Okonita

Hi,

You can use info from syscat.tables to find out which tables are in
which status, etc.
Normally, for a table to be fully accessible and usable, the STATUS
must have a value of 'N' and ACCESS_MODE must have be'F'.
'N' means Normal and 'F' means fully accessible.

So, you can try something like
Select * from syscat.tables where status not in ('N') and access_mode
not in ('F') and tabschema=<sche maName>
might be Ok.
status ='C' means Check Pending etc...
You have to Set Integrity/Reorg on these tables depending on their
status.

Also, as the table might be in Reorg pending/Integrity Pending state
because it's parent in it such state.
So, You have to run reorg/Integrity pending on parent first folllowed
by the child.

Rahul
rahul : i think you are terribly confused with reorg and set integrity
command..

if you are 8.1.7 n above you can use REORGCHK_TB_STA TS and
REORGCHK_IX_STA TS procedure .

Sep 10 '07 #3

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

Similar topics

5
16493
by: Jari Korkiakoski | last post by:
Hello, What kind of difference does it make to update statistics via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running directly 'runstats on table xxx.yyy with distribution and detailed indexes all" for all tables ? -- Jari Korkiakoski | jari.korkiakoski@iki.fi |#include <stddisclaimer.h> http://wwwkeys.eu.pgp.net:11371/pks/lookup?op=get&search=0x81F43B00
1
4820
by: hikums | last post by:
1. I did a reorgchk, and found that F2 on table and F4 on index indicates a reorg is necessary. 2. Did a reorg. 3. Again I do a reorgchk, the report is the same as in Step 1 4. I do a runstats on all columns and key columns with distribution and indexes all
3
5615
by: andy.standley | last post by:
Hi, I posted something a while ago about not being able to setup online reorgs - the db2 control center only offers online runstats. So I started adding tasks to reorg each table. This works fine, but sometimes it does not! The reorg fails and alerts me that it failed. The script is CONNECT TO ECNDB; REORG TABLE AIRLINE.FFMFWB INDEX AIRLINE.FFMFWB_IX1 INPLACE ALLOW WRITE ACCESS START ;
2
2374
by: EpsilonAurigae | last post by:
does anyone have an idea as to why the reorgchk utility says that a particular table needs to be reorged even after running the reorg command on that particular table. answer is appreciated.
9
17777
by: Mikael | last post by:
Must admit, I am new to DB2: Seems I can not issue command REORG TABLESPACE: Commands Entered: REORG TABLESPACE SBO_DB.TS_SBO_SAFE; SQL0104N An unexpected token "TABLESPACE" was found following "REORG". Expected tokens may include: "TABLE". SQLSTATE=42601
2
3849
by: sethwai | last post by:
Hi, I have a nightly script that executes inplace reorgs allow write access for several tables after a previous script does a large number of delete operations. It usually has been executing fine. The other night 3 of them failed due to the log file system filling up. I resumed them individually and they all completed successfully. To eliminate the log space problem I changed the script to wait for one to complete before startng...
2
4784
by: dunleav1 | last post by:
I have a many row and many column table that is in a 16K page size. I have four indexes on the table. I am running row compression on the table. The table does not have a primary key. The table does not have a clustered index. I ran a reorg on the table and the indexes. I ran runstats on the table and the indexes after the reorg. Three indexes on the table have an index cluster ratios of 99,99,100 respectively. The fourth index has a...
0
2253
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"
7
3286
by: Okonita via DBMonster.com | last post by:
Hi all, I am very surprised to see that after doing a Reorgchk followed by reorg of selected tables and concluding with a runstats of the reorged tables, all of the tables continue to be identified and selected as reorg candidates in subsequent/followup reorgchk. Has anyone had this experience? Can you share with me what you may have found out to the the reason and if possible what are the possible solutions to correct the situation?
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.