Types of DB2 data sets that can be encrypted by using DFSMS data set encryption
You can use DFSMS to encrypt various types of Db2® data sets including Db2-managed table space and index space data sets, data sets that are used by Db2 utilities, and sequential input and output data sets. Encrypted data sets must be SMS-managed extended format.
Db2-managed table space and index space data sets
After you set up DFSMS encryption, you can run certain Db2 utilities to encrypt and decrypt Db2-managed table space and index space data sets.
The following utilities encrypt or decrypt the data sets for table spaces or index spaces based on the current key label that is defined in RACF data set profile or the current key label specified at the table level or storage group level or SMS data class:
- REORG TABLESPACE or REORG INDEX
- LOAD REPLACE
- RECOVER from sequential image copies– point in time or full recovery
- REBUILD INDEX
- If REUSE is specified, the existing key label and encryption status remain unchanged.
- If REUSE is not specified, these utilities reallocate the underlying data sets with the current key label. The existing key label and encryption status change if a new key label is defined in the RACF data set profile (or equivalent product) or SMS data class. Removing the key label from the data set profile or data set class causes these utilities to reallocate the underlying data sets without a key label and unencrypt the data.
For REORG TABLESPACE, REORG INDEX or LOAD REPLACE with SHRLEVEL CHANGE or SHRLEVEL REFERENCE, the shadow data sets will be allocated as encrypted if a key label is provided in the RACF data set profile (or equivalent product) or SMS data set class.
Partition and Piece Level Encryption or Decryption
The following utilities can be invoked with the PART or DSNUM option for partitioned table spaces or indexes to encrypt or decrypt at the partition level:
- REORG TABLESPACE or REORG INDEX
- LOAD REPLACE
- RECOVER from sequential image copies– point in time or full recovery
- REBUILD INDEX
When the PART option is specified for REORG TABLESPACE or LOAD REPLACE, any NPIs over the table space will keep its existing key label and encryption status.
Use REORG INDEX on NPIs to encrypt or decrypt the entire NPI using the current key label.
When the DSNUM n option is specified for RECOVER of a piece of a non partitioned table space or index space, the underlying VSAM data set for that piece will be reallocated with the current key label.
Data sets that are used by utilities
Among the data sets that are used by utilities are data files for loading or unloading, utility control statement files, temporary work files for index keys or rows, and image copy data sets.
To encrypt utility data sets, use the RACF data set profile, JCL, or the SMS data class.
If a key label is defined, DFSMS uses the following order of precedence to determine the key label at the time of allocation of utility data sets:
- RACF Data set profile
- JCL, Dynamic Allocation, TSO Allocate
- SMS construct: data class
z/OS® DFSMS data set encryption does not support sequential data sets on tape, DUMMY data sets, sort work data sets, or basic format data sets.
Encrypted input and output data sets for stand-alone utilities
The stand-alone utilities DSN1COPY, DSN1PRNT, DSN1COMP, DSNJU003, DSNJU004, DSNJCNVT, DSNJCNVB, and DSN1LOGP support encryption.
DSN1COPY, DSN1PRNT, and DSN1COMP will support encrypted VSAM or sequential data sets as input (SYSUT1 DD) and output (SYSUT2 DD) if the data sets are allocated with a key label. Since these stand-alone utilities do not allocate data sets, the data sets must be allocated with a key label before the job is executed. DSN1LOGP will support encrypted log data sets as input.
The job user ID must be permitted to access any underlying encrypted data sets used to run the utility.
