473,395 Members | 2,446 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,395 software developers and data experts.

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 4983
On Sep 10, 5:12 am, Okon...@gmail.com 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=<schemaName>
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.com 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=<schemaName>
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_STATS and
REORGCHK_IX_STATS procedure .

Sep 10 '07 #3

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

Similar topics

5
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...
1
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...
3
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,...
2
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
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...
2
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...
2
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...
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"
7
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.