Enable and test encryption in IBM Db2
Perform the following tasks to enable and test encryption in Db2:
Open a text editor and create a kmip.cfg configuration file with the following details:
An example configuration file is as follows:
Save the file to your working folder (such as C:\Certs).
Open the Db2 Command Line Processor.
Run the following commands to point to the by using the configuration file:
Run the following commands to bounce the database:
In the IBM Db2 Command Line Processor, run the following commands to create an encrypted database:
Replace fxencdb with the desired database name. Note that database names can be a max of eight characters.
After running the above command, the master encryption key will be generated inside the IBM Db2 service on the .
The following message displays after the process successfully completes:
Verify the database has been successfully encrypted by executing the following command:
Ensure that the Encrypted Database configuration parameter is set to YES in the command response.
Verify the creation of the key on the by going to Key Management > Keys. The HSM Protected key generated for IBM DB2 is similar to the following naming scheme:
For more information on configuring a KMIP key store with IBM DB2, consult the IBM documentation.