# Where can I see table partitioning key values ?

**URL:** <https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141>\
**Category:** Toad for IBM DB2\
**Created:** [June 9, 2014, 2:29pm UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141 "2014-06-09T14:29:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnupDB2\_User](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@AnupDB2\_User](https://forums.toadworld.com/u/AnupDB2_User)\
**Post date:** [June 9, 2014, 2:29pm UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/1 "2014-06-09T14:29:13Z")

</div>

I want to check partitioning key values of a table in DB2. I just now joined a new team and they are using DB2 partitioning on few tables(and I have to alter those partitions as data increasing and old partitions are not effective.) How can I see current partition key values of a table ?

Thanks,

Help will be appreciated.

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [June 10, 2014, 8:02am UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/2 "2014-06-10T08:02:47Z")

</div>

For LUW you can see the keys in the Table Object Editor or the Object Viewer Script tab.

For z/OS there is an Object Viewer tab called “Limit Keys”. I’ve opened issue TDB-885 to create an Object Viewer tab for LUW tables.

Thanks.

---

<div class="post-metadata">

**Author:** ![AnupDB2\_User](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@AnupDB2\_User](https://forums.toadworld.com/u/AnupDB2_User)\
**Post date:** [June 12, 2014, 2:00pm UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/3 "2014-06-12T14:00:20Z")

</div>

Thanks Adam,

Just curious, where did this key values get stored ?

In the same table or DB2 maintains a separate table in a database to store key values for all the tables in a same DB.

Thanks again

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [June 13, 2014, 7:47am UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/4 "2014-06-13T07:47:04Z")

</div>

SELECT \* FROM SYSCAT.DATAPARTITIONS

WHERE TABSCHEMA = ? AND TABNAME = ?

ORDER BY SEQNO

---

<div class="post-metadata">

**Author:** ![AnupDB2\_User](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@AnupDB2\_User](https://forums.toadworld.com/u/AnupDB2_User)\
**Post date:** [June 15, 2014, 9:05am UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/5 "2014-06-15T09:05:27Z")

</div>

Thanks [mention:ba78786bfdeb4563ac0935414b41acb9:e9ed411860ed4f2ba0265705b8793d05]

---

<div class="post-metadata">

**Author:** ![kernel\_sphere](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kernel\_sphere](https://forums.toadworld.com/u/kernel_sphere)\
**Post date:** [June 16, 2014, 5:36am UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/6 "2014-06-16T05:36:55Z")

</div>

Table partitioning is a data organization scheme in which table data is divided across multiple storage objects called data partitions or ranges.

[www.ibm.com/…/dm-0605ahuja2](http://www.ibm.com/developerworks/data/library/techarticle/dm-0605ahuja2/) copy this link and check it out.

thanks

---

<div class="post-metadata">

**Author:** ![ravikumar99](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@ravikumar99](https://forums.toadworld.com/u/ravikumar99)\
**Post date:** [October 25, 2016, 10:18am UTC](https://forums.toadworld.com/t/where-can-i-see-table-partitioning-key-values/30141/7 "2016-10-25T10:18:05Z")

</div>

The partitioning key is defined using the `DISTRIBUTED BY HASH` clause in the `CREATE TABLE` command. After the partition key is defined, it cannot be altered. The only way to change it is to recreate the table.
