Distributed files with DB2 Multisystem

 

A distributed file is a database file that is spread across multiple System i™ models.

Distributed files can be updated, and they can be accessed through such methods as SQL, query tools, and the Display Physical File Member (DSPPFM) command. For database operations, distributed files are treated just like local files, for the most part. You can find information about CL command changes for distributed files in How CL commands work with distributed files topic.

To create a database file as a distributed file, you can use either the Create Physical File (CRTPF) command or the SQL CREATE TABLE statement. Both methods are discussed in more detail in this topic. The CRTPF command has two parameters, node group (NODGRP) and partitioning key (PTNKEY), that create the file as a distributed file. You can see the distributed database file as an object (*FILE with the PF attribute) that has the name and library that you specified when you ran the CRTPF command.

If you want to change an existing nondistributed database physical file into a distributed file, you can do this by using the Change Physical File (CHGPF) command. On the CHGPF command, the NODGRP and PTNKEY parameters allow you to make the change to a distributed file. Through the CHGPF command, you can also change the data partitioning attributes for an existing distributed database file by specifying values for the NODGRP and PTNKEY parameters. Specifying values for these parameters causes the data to be redistributed according to the partitioning table in the node group.

All logical files that are based over the physical file that is being changed to a distributed file also become distributed files. For large files or large networks, redistributing data can take some time and should not be done frequently.

 

Parent topic:

DB2 Multisystem

 

Related concepts


Create Node Group command
How CL commands work with distributed files