手工修改统计数据之一。在 db2look.out 文件中搜索下列语句(请注意,模式名、TABSCHEMA 和 INDSCHEMA 可能与您的具体情况不同):
UPDATE SYSSTAT.INDEXES
SET NLEAF=1,
NLEVELS=1,
FIRSTKEYCARD=35,
FIRST2KEYCARD=35,
FIRST3KEYCARD=-1,
FIRST4KEYCARD=-1,
FULLKEYCARD=35,
CLUSTERFACTOR=-1.000000,
CLUSTERRATIO=100,
SEQUENTIAL_PAGES=0,
DENSITY=0,
AVERAGE_SEQUENCE_GAP=0.000000,
AVERAGE_SEQUENCE_FETCH_GAP=0.000000,
AVERAGE_SEQUENCE_PAGES=0.000000,
AVERAGE_SEQUENCE_FETCH_PAGES=0.000000,
AVERAGE_RANDOM_PAGES=1.000000,
AVERAGE_RANDOM_FETCH_PAGES=0.000000,
NUMRIDS=35,
NUMRIDS_DELETED=0,
NUM_EMPTY_LEAFS=0
WHERE INDNAME = ’NAME_IND’
AND INDSCHEMA = ’SKAPOOR ’
AND TABNAME = ’STAFF’
AND TABSCHEMA = ’SKAPOOR ’;
现在,将 FIRSTKEYCARD、FIRST2KEYCARD、
FULLKEYCARD 和 NUMRIDS 从 35 修改为 37。现在保存
db2look.out 文件并运行这 3 个文件:
db2 -tvf config.out > config_output.out
db2 -tvf storage.out > storage_output.out
db2 terminate
db2stop
db2start
db2 -tvf db2look.out > db2look_output.out |
检查前两个文件 config_output.out 和 storage_output.out 的内容,以确保它们运行成功。现在,检查
db2look_output.out 文件的内容。您将看到下列更新语句失败了:
UPDATE SYSSTAT.INDEXES SET NLEAF=1, NLEVELS=1,
FIRSTKEYCARD=37, FIRST2KEYCARD=37
, FIRST3KEYCARD=-1, FIRST4KEYCARD=-1,
FULLKEYCARD=37, CLUSTERFACTOR=-1.000000, C
LUSTERRATIO=100, SEQUENTIAL_PAGES=0,
DENSITY=0, AVERAGE_SEQUENCE_GAP=0.000000, A
VERAGE_SEQUENCE_FETCH_GAP=0.000000,
AVERAGE_SEQUENCE_PAGES=0.000000, AVERAGE_SEQ
UENCE_FETCH_PAGES=0.000000,
AVERAGE_RANDOM_PAGES=1.000000, AVERAGE_RANDOM_FETCH_
PAGES=0.000000, NUMRIDS=37,
NUMRIDS_DELETED=0, NUM_EMPTY_LEAFS=0 WHERE INDNAME =
’NAME_IND’ AND INDSCHEMA = ’SKAPOOR ’
AND TABNAME = ’STAFF’ AND TABSCHEMA = ’SK
APOOR ’
DB21034E The command was processed as
an SQL statement because it was not a
valid Command Line Processor command.
During SQL processing it returned:
SQL1227N The catalog statistic "37"
for column "FULLKEYCARD" is out of range
for its target column, has an invalid
format, or is inconsistent in relation
to some other statistic. Reason Code = "8".
SQLSTATE=23521 | |