Save access paths

When you restore a database file, but you did not save the access path to the database, the server rebuilds the access path. You can significantly reduce the amount of time it takes you to recover if you save the access paths. However, the process that saves access paths increases the time for the save operation and the amount of media that you use.

To save access paths that are owned by logical files, specify ACCPTH(*YES) on the SAVCHGOBJ, SAVLIB, and SAVOBJ commands when you save the physical files. The server saves access paths when you save the physical file because the physical file contains the data that is associated with the access path. When you save the logical file, you are saving only the description of the logical file.

When a save command (SAVLIB, SAVOBJ, SAVCHGOBJ, SAVRSTLIB, SAVRSTOBJ, or SAVRSTCHG) is performed, the save access paths parameter value is determined by the QSAVACCPTH system value when ACCPTH(*SYSVAL) is specified. When ACCPTH(*YES) or ACCPTH(*NO) is specified, this system value is ignored. If access paths are to be saved, the process that saves access paths increases the time for the save operation and the amount of media that you use. However, by having the access paths saved, you significantly reduce the amount of time it takes to recover a system because the access paths do not need to be rebuilt.

The server saves access paths that logical files own, and that are not used for referential constraints if all of the following are true:

In all cases, the server saves an access path only if it is valid and not damaged at the time of the save operation.

When you save a physical file that is not a source file, the server saves the following types of access paths with it, even if you do or do not specify ACCPTH(*YES):

If the based-on physical files and the logical files are in different libraries, the server saves the access paths. However, the server may not restore these access paths. Look for information about restoring access paths in the Backup and Recovery bookLink to PDF.