The REDISTRIBUTE DATABASE PARTITION
GROUP command is the recommended interface for performing
data redistribution.
Before you begin
Restrictions
Procedure
To redistribute data across database partitions in a
database partition group:
- Optional: Perform a backup of the database.
See the
BACKUP DATABASE command.
It is strongly recommended that you create a backup
copy of the database before you perform a data redistribution that
is not roll-forward recoverable.
- Connect to the database partition that contains the system
catalog tables.
See the CONNECT statement.
- Issue the REDISTRIBUTE DATABASE PARTITION GROUP command.
Note: In
previous versions of the Db2® database product,
this command used the NODEGROUP keyword instead of the DATABASE
PARTITION GROUP keywords.
Specify
the following arguments:
- database partition group name
- You must specify the database partition group within which data
is to be redistributed.
- UNIFORM
- OPTIONAL: Specifies that data is to be evenly
distributed. UNIFORM is the default when no distribution-type
is specified, so if no other distribution type has been specified,
it is valid to omit this option.
- USING DISTFILE distfile-name
- OPTIONAL: Specifies that a customized distribution is desired
and the file path name of a distribution file that contains data that
defines the desired data skew. The contents of this file is used to
generate a target distribution map.
- USING TARGETMAP targetmap-name
- OPTIONAL: Specifies that a target data redistribution map is to
be used and the name of file that contains the target redistribution
map.
For details, see the
REDISTRIBUTE DATABASE
PARTITION GROUP command-line utility information.
- Allow the command to run uninterrupted.
When
the command completes, perform the following actions if the data redistribution
proceeded successfully:
Results
Data redistribution is complete and information about the data redistribution process is
available in the redistribution log file. Information about the distribution map that was used can
be found in the Db2 explain tables.