467,171 Members | 1,258 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,171 developers. It's quick & easy.

dropped a not null column from a table, error while running stats

Hi,

I dropped a not null column from a table.
After that i reorganized the table.
However, an update statement is giving error like
"(Reason "column number out of range".) SQLSTATE=58004"

So i ran stats on the table like
"RUNSTATS ON TABLE <SCHEMA.TABNAME>"

However, it gives error(warning) like
SQL2314W Some statistics are in an inconsistent state. The newly
collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650

and i cannot find out how to run stats on indexes.
"RUNSTATS ON INDEX <INDEX_NAME. is not the syntax.

Further, is the problem coming due to this or their could be some
other problem.

Please help as it is urgent.

Thanks

Rahul

Aug 29 '07 #1
  • viewed: 4540
Share:
2 Replies
On Wed, 29 Aug 2007 12:17:57 +0000, Rahul B scribbled:
However, it gives error(warning) like SQL2314W Some statistics are in
an inconsistent state. The newly collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650

and i cannot find out how to run stats on indexes. "RUNSTATS ON INDEX
<INDEX_NAME. is not the syntax.
Indeed. A simplified version of the RUNSTATS syntax might look something
like this:

RUNSTATS ON TABLE [schname.tbname] [WITH DISTRIBUTION]
[AND [DETAILED] INDEXES ALL]
[SET PROFILE ONLY]

See the RUNSTATS reference [1] for the full syntax, but what's above is
all I find I need to remember on a daily basis. So, in your case
something like:

RUNSTATS ON TABLE schname.tbname AND INDEXES ALL

ought to do the trick.

[1] http://publib.boulder.ibm.com/infoce...2luw/v9/topic/
com.ibm.db2.udb.admin.doc/doc/r0001980.htm
Cheers,

Dave.
Aug 29 '07 #2
On Aug 29, 6:37 pm, Dave Hughes <d...@waveform.plus.comwrote:
On Wed, 29 Aug 2007 12:17:57 +0000, Rahul B scribbled:
However, it gives error(warning) like SQL2314W Some statistics are in
an inconsistent state. The newly collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650
and i cannot find out how to run stats on indexes. "RUNSTATS ON INDEX
<INDEX_NAME. is not the syntax.

Indeed. A simplified version of the RUNSTATS syntax might look something
like this:

RUNSTATS ON TABLE [schname.tbname] [WITH DISTRIBUTION]
[AND [DETAILED] INDEXES ALL]
[SET PROFILE ONLY]

See the RUNSTATS reference [1] for the full syntax, but what's above is
all I find I need to remember on a daily basis. So, in your case
something like:

RUNSTATS ON TABLE schname.tbname AND INDEXES ALL

ought to do the trick.

[1]http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/
com.ibm.db2.udb.admin.doc/doc/r0001980.htm

Cheers,

Dave.
Thanks a ton, Dave.

That has indeed worked.

Rahul

Aug 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Agoston Bejo | last post: by
3 posts views Thread by olanorm@gmail.com | last post: by
11 posts views Thread by Al Murry | last post: by
2 posts views Thread by mike.usenet@gmail.com | last post: by
7 posts views Thread by am72de@yahoo.de | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.