Staging data sets and the FASTSWITCH process


In the FASTSWITCH process, LOADPLUS bypasses the VSAM rename process and changes the Db2 catalog entry to point to the staging data sets.

To use the FASTSWITCH process, you must take one of the following actions:

  • Set the FASTSWITCH command or installation option to YES.
  • Set the FASTSWITCH installation option to ZPARM, and ensure that the Db2 ZPARM value is YES.

For more information about this option, see FASTSWITCH.

Related topic

Naming conventions for the FASTSWITCH process

If you need to preallocate or define the staging data sets, use the original Db2 data set names as a starting point, but replace the I qualifier with J, or the J qualifier with I.

 The following table illustrates this naming convention for staging data sets for the FASTSWITCH process:

Existing data set name

Staging data set name

VCAT.DSNDBC.database.tableSpace. I0001.Annn

VCAT.DSNDBC.database.tableSpace. J0001.Annn

VCAT.DSNDBD.database.tableSpace. I0001.Annn

VCAT.DSNDBD.database.tableSpace. J0001.Annn

VCAT.DSNDBC.database.tableSpace. J0001.Annn

VCAT.DSNDBC.database.tableSpace. I0001.Annn

VCAT.DSNDBD.database.tableSpace. J0001.Annn

VCAT.DSNDBD.database.tableSpace. I0001.Annn

Data set FASTSWITCH process

After writing the loaded objects to the staging data sets (named as shown in the Naming conventions for staging data sets for the FASTSWITCH process table), LOADPLUS replaces the original data sets by using the following process. The Data set FASTSWITCH process figure illustrates this process.

Warning

Important

You can control when this process occurs by using the SWITCHTIME option. For more information, see SWITCHTIME.

  1. LOADPLUS prevents all access to the objects and updates the Db2 catalog (SYSIBM.SYSTABLEPART and SYSIBM.SYSINDEXPART) to point to the staging data sets.

    This part of the process makes the original data sets obsolete.

  2. After the switch is successful and the LOAD or COPY row is registered in the SYSIBM.SYSCOPY catalog table, LOADPLUS starts the objects with their original statuses.
  3. The next step depends on the value for the ORIGDISP or ORIGINALDISP option:
    • If the value for the ORIGDISP or ORIGINALDISP option is DELETE, LOADPLUS deletes the now-obsolete original data sets.
    • If the value for this option is RENAME, LOADPLUS retains the staging data sets but does not rename them.

      The data sets still exist with their original names, preserving the space. You can use them as staging data sets in a future load job.

 

 The following figure displays the data set FASTSWITCH process:

data_set_FASTSWITCH_process.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

LOADPLUS for DB2 13.1