Common Management of DB2 multi-partition Databases

Source: Internet
Author: User
Tags db2 connect db2 connect to db2 values


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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.