home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC87667 Status: Closed

UPDATE SYSSTAT.COLUMNS FOR HIGH2KEY AND LOW2KEY MIGHT RETURN SQLCODE -1227
IN DB2_COMPATIBILITY_VECTOR=ORA MODE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Run NNSTAT against a nickname in DB2_COMPATIBILITY_VECTOR=ORA 
mode failed with "SQL1227N reason code=3" error, even 
though 
there is only one row in the remote table. Here is the recreate 
script: 
 
db2set DB2_COMPATIBILITY_VECTOR=ORA 
db2 force application all 
db2 terminate 
db2stop 
db2start 
db2 create db ora 
db2 connect to ora 
db2 "create wrapper net8" 
db2 "create server ora10g type oracle version 10.2.0 wrapper 
net8 options (node 'nodename')" 
db2 "create user mapping for user server ora10g options 
(remote_authid 'username', remote_password 'password')" 
db2 set passthru ora10g 
db2 "create table test (c1 varchar2(15))" 
db2 "insert into test values ('ABCDEF')" 
db2 set passthru reset 
db2 "create nickname schema.test_n1 for ora10g.username.test" 
db2 "call 
sysproc.nnstat('ORA10G','SCHEMA','TEST_N1',null,null,2,'/tmp 
/nnstat.log',?)" 
SQL1227N  The catalog statistic "ABCDEF" for column "HIGH2KEY" 
is out of range 
for its target column, has an invalid format, or is inconsistent 
in relation 
to some other statistic. Reason Code = "3". 
 
The reason is there is rules about HIGH2KEY and LOW2KEY when 
manually update catalog statistics tables: 
HIGH2KEY is greater than LOW2KEY whenever there are more than 
three distinct values in the corresponding column. 
HIGH2KEY can equal to LOW2KEY when distinct value less then 
three. 
 
For example: 
In normal mode: 
=> db2 "update SYSSTAT.COLUMNS set (HIGH2KEY,LOW2KEY) = 
('ABCDEF','ABCDEF') where TABNAME='TEST_N1' and COLNAME = 'C1'" 
DB20000I  The SQL command completed successfully. 
 
But in Oracle mode: 
=> db2 "update SYSSTAT.COLUMNS set (HIGH2KEY,LOW2KEY) = 
('ABCDEF','ABCDEF') where TABNAME='TEST_N1' and COLNAME = 'C1'" 
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 "ABCDEF" for column "HIGH2KEY" 
is out of range for 
its target column, has an invalid format, or is inconsistent in 
relation to 
some other statistic. Reason Code = "3".  SQLSTATE=23521
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* User who use NNSTAT in DB2_COMPATIBILITY_VECTOR=ORA Mode.    * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Federation Server v9.7 fp8 or later version       * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
This problem is fixed in Federation Server v9.7 fp8
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC89713 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
30.10.2012
02.04.2013
02.04.2013
Problem solved at the following versions (IBM BugInfos)
9.7.FP8
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.8 FixList