DB2 's multiple partitioning management is often a bit challenging, but many times the differences between multiple and single partitioning are not very large, as summarized below are common operations management commands:
Start the database node for the specified partition:
Db2start Dbpartitionnum Dbnodenum
In daily operation, we need to determine the current connection node number, the following is to check the current partition node number method:
DB2 Values Current Dbpartitionnum
In a daily, multiple-partition environment, you need to view the number of partition groups as follows:
DB2 LIST DATABASE PARTITION GROUPS show DETAIL
When the data distribution for a multiple-partition database is uneven, you need to repartition the database partition group data:
DB2 "Redistribute Database PARTITION group
DB2 "Redistribute DATABASE PARTITION GROUP pg123 using Targetmap pg123.map "
DB2" redistribute DATABASE PARTITION GROUP ibmdefaultgroup using Targetmap/home/wa Ngfg/t2.map TABLE (T2) only
Check the distribution of partitioned table data across partitions:
SELECT Dbpartitionnum (distribution key), COUNT (*) from
GROUP by Dbpartitionnum (distribution Key) Order by
Dbpartitionnum (distribution key)
To view the distribution of partition maps:
SELECT Hashedvalue (distribution
key), COUNT (*) from
GROUP by Hashedvalue (distribution key) ORDER BY
Hashedvalue (distribution key)
For multiple partitioning operations, you can manage multiple partitions by referring to commands such as the following:
Db2_all ' DB2 update db CFG for TESTDB using Logretain on '
db2_all ';d b2 update db cfg for TestDB USING logretain on '
db2_all "DB2 CONNECT to TestDB;d B2 LIST tablespaces show DETAIL"