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

How to tell if a table is in REORG PENDING state

I have some scripts that drop columns in DB2 9. This leaves the table
in a REORG PENDING state:

[IBM][CLI Driver][DB2/NT] SQL0668N Operation not allowed for reason
code "7" on table "tablename". SQLSTATE=57016

I want to write a script that finds all tables in this state and
REORGs them, but I don't know how to generate a set of tables that are
in this state: if I use REORGCHK_TB_STATS I will have to call it once
for every table in the database. Is there an easy way to tell what
tables are in a REORG_PENDING state?

I was hoping that STATUS in SYSCAT.TABLES would tell me, but no....
Nov 23 '07 #1
1 24231
deangc wrote:
I have some scripts that drop columns in DB2 9. This leaves the table
in a REORG PENDING state:

[IBM][CLI Driver][DB2/NT] SQL0668N Operation not allowed for reason
code "7" on table "tablename". SQLSTATE=57016

I want to write a script that finds all tables in this state and
REORGs them, but I don't know how to generate a set of tables that are
in this state: if I use REORGCHK_TB_STATS I will have to call it once
for every table in the database. Is there an easy way to tell what
tables are in a REORG_PENDING state?

I was hoping that STATUS in SYSCAT.TABLES would tell me, but no....
Try the ADMINTABINFO Administrative View:

select TABSCHEMA, TABNAME
from SYSIBMADM.ADMINTABINFO
where REORG_PENDING = 'Y'

Described in the Information Center: http://tinyurl.com/3aqkes

HTH

--
Jeroen
Nov 23 '07 #2

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

Similar topics

0
by: GB | last post by:
In a log shipping scenario I would like to be able to test my database and set it back manually in roll forward pending state, is it possible ? What I would like to do in detail: - On the...
3
by: Stephen | last post by:
This is probably something simple but I've been trying for a while now and can't seem to get it. I'm loading a table from an IXF file with the following command 'load from...
10
by: technocrat | last post by:
How can i find the load state of the table using SQL, i can do "load query table tablename" but i cannot execute this as a sql statement. What i want to do is, i m using a java stored priocedure to...
7
by: satish mullapudi | last post by:
Hi All, I am using Db2 UDB v 8.2 on RHEL . I have performed a load operation on a table. Now that tablespace has been switched into RESTORE PENDING state. Now I can only read the data in the...
1
by: amitabh.mehra | last post by:
If I drop some constraints on a table by 'alter table..' query, does this table go into check pending state? If no, then what is the way to put this table into check pending state other than using ...
1
by: balubkp | last post by:
Hai I Have One Doubt Can U Please Send Me The Answer How To Solve Load Pending State.
1
by: balubkp | last post by:
hai can u please send me the backup pending state details and solution
1
by: balubkp | last post by:
can u plz tell me the rollforward recovery & rollforward pending state concepts
0
by: msheikh25 | last post by:
After a failed informatica load session, when I try to select from a table it shows that the table is in Load Pending state: 1 ----------- SQL0668N Operation not allowed for reason code "3" on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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,...
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...

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.