View previous topic :: View next topic
|
Author |
Message |
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
How to decode the value in LIMITKEY column of SYSINDEXPART table?
For example, What is the decoded value of X'B8000000FFFFFFFFFFFFFF' in LIMITKEY column of SYSINDEXPART table and how to decode it? |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Shankar,
What is the data type of that partition column ? Because for data type other than CHAR or VARCHAR DB2 tries to store it in some internal format.
Like for example, the index INEXAGTC has 10 partition and following are the column specifications,
Code: |
DSTO_NO CHAR 10
DSTR_NO CHAR 10
CASE_POL_NO CHAR 15
AGTC_UPD_TS TIMESTAMP |
When i look-up in the SYSINDEXPART, i get the following values for the column limitkey.
Code: |
LSW 5500010003714492X .. . ..Î..
LSW 5500010077595344X .... .....
LSW 5500031488653117X .... . ø..
LSW 5500071139703858X .... . .Ëè
LSW 5500077590758546X .... èãØçë
021 38286 AMF NW A .... ê Îñ
111 32097 AMF CWGI C .... ..Ã`ñ
318 47550 L0190470 .......Ø.é
6AC 44755 704980900 .. . .. I
996 55956 N5024469 .. ..ñ.o..
|
CHAR datatypes are visible but timestamp values are not visible.
But, when i see it in hex, timestamp values are visible,
Code: |
9F2E7404040404040404020100128012830762112
4F4E7404040404040404020091231013011141813
1F7E7404040404040404020100605021404703633
5F8E7404040404040404020100811013803277354
4F6E7404040404040404020100730015446804853
5E640C14040404040404020091210015202047649
3E6C7C940C3404040404020100610021423667949
0F4F7F04040404040404020101116053606802251
8F0F9F0F040404040404020100219030418370489
4F4F6F94040404040404020100105054905961709
|
Without knowing the internal format, its pretty hard to convert it manually. But, DB2 tools like Platinum or others can help you with that.
Sushanth |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Per the DB2 Manual, the LIMITKEY is stored in INTERNAL-format in the SYSINDEXPART table:
"LIMITKEY VARCHAR(512) NOT NULL WITH DEFAULT FOR BIT DATA
The high value of the limit key of the partition in an internal format. An empty string if the index is not partitioned or for a data-partitioned secondary index (DPSI). If any column of the key has a field procedure, the internal format is the encoded form of the value.""
To see the EXTERNAL-format, see LIMITKEY in the SYSTABLEPART table:
"LIMITKEY VARCHAR(765) NOT NULL
The high value of the partition in external format. If the table space was converted from index-controlled partitioning to table-controlled partitioning, the value is the highest possible value for an ascending key, or the lowest possible value for a descending key. If the table space is not partitioned, the value is an empty string." |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Ronald Burr, that works.
Thank You. |
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
Thank you |
|
Back to top |
|
|
|