Adding database partitions in partitioned database environments
You can add database partitions to the partitioned database system either when it is running, or when it is stopped. Because adding a new server can be time consuming, you might want to do it when the database manager is already running.
- As an option on the START DBM command
- With the ADD DBPARTITIONNUM command
- With the sqleaddn API
- With the sqlepstart API
If your system is stopped, use the START DBM command. If it is running, you can use any of the other choices.
- The same as those defined for the catalog partition for each database. (This is the default.)
- The same as those defined for another database partition.
- Not created at all. You must use the ALTER TABLESPACE statement to add temporary table space containers to each database before the database can be used.
You cannot use a database on the new database partition to contain data until one or more database partition groups are altered to include the new database partition.
You cannot change from a single-partition database to a multi-partition database by adding a database partition to your system. This is because the redistribution of data across database partitions requires a distribution key on each affected table. The distribution keys are automatically generated when a table is created in a multi-partition database. In a single-partition database, distribution keys can be explicitly created with the CREATE TABLE or ALTER TABLE SQL statements.
Windows Considerations: If you are using Enterprise Server Edition on a Windows operating system and have no databases in the instance, use the db2ncrt command to scale the database system. If, however, you already have databases, use the START DBM ADD DBPARTITIONNUM command to ensure that a database partition is created for each existing database when you scale the system. On Windows operating systems, do not manually edit the database partition configuration file (db2nodes.cfg), because this can introduce inconsistencies to the file.