database Partition Feature :
The Database Partitioning Feature (DPF) is a value-added option available with DB2 Enterprise 9. It extends the capability of DB2 9 into the parallel, multi-partition environment, improving performance and scalability of very large databases. This allows very complex queries to be executed much faster. DB2 Enterprise 9 with DPF is an ideal solution for managing data warehousing and data mining environments, but can also be used for large online transaction processing (OLTP) workloads.
A database partition can be either logical or physical. Logical partitions reside on the same physical server and can take advantage of SMP architecture. Having a
partitioned database on a single machine with multiple logical nodes is know as having a shared-everything architecture, because the partitions use common memory, CPUs, disk controllers, and disks. Physical partitions consist of two or more physical servers and the database is partitioned across these servers. This is know as a shared-nothing architecture, because each partition has its own memory, CPU’s, disk controllers and disks.
創建database partition
1、創建需要建立數據庫分區的db instance
可使用命令建立db instance :
db2icrt -s ESE -u db2admin,aaa123456 -h ANWENHAO DBINSTANCENAME
創建完成對應的instance 后需要重啟DB2 .
2、將新建的db instance 加入到DB2中:
CATALOG LOCAL NODE DB2INST1 INSTANCE DB2INST1 SYSTEM ANWENHAO OSTYPE NT;
3、在命令行中設置當前需要操作的dbInstance
set db2instance=db2inst1
db2 get instance
db2 attach to db2inst1
4、創建DBPartition :
db2start dbpartitionnum 1 ADD DBPARTITIONNUM HOSTNAME ANWENHAO PORT 1 COMPUTER ANWENHAO USER db2admin PASSWORD aaa123456 WITHOUT TABLESPACES
5、創建完成后需要重新啟動db2。DB2在此時會增加一個database partition 并進行 redistribution
以上操作即完成database partition 。
創建database partition group :
CREATE DATABASE PARTITION GROUP "NODE1" ON DBPARTITIONNUMS (1);
COMMENT ON DATABASE PARTITION GROUP "NODE1" IS 'ANWENHAO _1';
然后可以在建立tablespace時選擇是否建立在一個database partition group中。這樣我們就可以輕松使用DB2的database Partition建立集群的應用了。
posted on 2007-08-21 17:03
安文豪 閱讀(1418)
評論(0) 編輯 收藏