Reusable open data paths with DB2® Multisystem

Reusable open data paths (ODPs) have special considerations for distributed queries. Like most other aspects of distributed queries, ODPs have two levels: distributed and local.

The distributed ODP is the coordinating ODP. A distributed ODP associates the query to the user and controls the local ODPs. Local ODPs are located on each system involved in the query, and they take requests through the distributed ODP.

Figure 1. Example of an ODP
figure of an Open Data Path (ODP)

For example, if a request is made to perform an SQL FETCH, the request is made against the distributed ODP. The system then takes that request and performs the appropriate record retrieval against the local ODPs.

With distributed queries, it is possible for the distributed ODP to be reusable, yet for one or more of the local ODPs to be nonreusable; however, if the distributed query ODP is nonreusable, the local ODPs are always nonreusable. This is allowed so that:
  • Each local system can decide the best way to open its local ODP (reusable versus nonreusable).
  • Regardless of the local ODP methods, the distributed ODP can be opened as reusable as much as possible in order to maintain active resources, such as communications.
The system tries to make the distributed ODP reusable whenever possible, even when an underlying local ODP is not reusable. If this occurs, the system handles the ODP refresh as follows:
  • Cycles through each local ODP
  • Performs a refresh of a reusable local ODP
  • Performs a hard close and reopen of a nonreusable ODP
  • Completes any remaining refresh of the distributed ODP itself that is needed

The distributed ODP is reusable more often than local ODPs, because the distributed ODP is not affected by some of the things that make local ODPs nonreusable, such as a host variable in a LIKE clause or the optimizer choosing nonreusable so that an index-from-index create operation can be performed. The cases that would make distributed ODPs nonreusable are a subset of those that affect local ODPs. This subset includes the following items:

  • The use of temporary files other than for sorting. These are called multistep distributed queries, and the optimizer debug message CPI4343 is signalled for these cases.
  • Library list changes, which can affect the files being queried.
  • OVRDBF changes, which affects the files being queried.
  • Value changes for special registers USER or CURRENT TIMEZONE.
  • Job CCSID changes.
  • The Reclaim Resources (RCLRSC) command being issued.

The reusability of the local ODP is affected by the same conditions that already exist for nondistributed query ODPs. Therefore, the same considerations apply to them as apply to local query ODPs.