By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.