The multi-partition management of DB2 is usually a little challenging for everyone. However, in many cases, the management of multi-partition and single-partition is not very different. The following summarizes the common operation management commands:
Start the database node of the specified partition: db2start dbpartitionnum DBNODENUM in daily operations, we need to determine the number of the current connection node. The following is how to check the number of the current partition node: db2 values current dbpartitionnum
In a daily multi-PARTITION environment, you need to check the number of partition groups for www.2cto.com as follows: when the data distribution of the db2 list database partition groups show detail multi-partition database is uneven, database partition group data needs to be redistributed db2 "redistribute database partition group pg123 UNIFORM" ORdb2 "redistribute database partition group pg123 using TARGETMAP pg123.map" db2 "redistribute database partition group specified using targetmap/home/Wang /t2.map TABLE (t2) ONLY"
Check the distribution of partition table data in each partition select dbpartitionnum (distribution key), COUNT (*) FROM schema. table www.2cto.com group by dbpartitionnum (distribution key) order by dbpartitionnum (distribution key)
View partition graph distribution select hashedvalue (distribution key), COUNT (*) FROM schema. tableGROUP by hashedvalue (distribution key) order by hashedvalue (distribution key)
FOR multi-partition operations, see the following command to manage multiple partitions: db2_all "db2 update db cfg for testdb using logretain on" db2_all "; db2 update db cfg for testdb using logretain on "db2_all" db2 connect to testdb; db2 list tablespaces show detail"
Author: marvelyu